Skip to content

Commit

Permalink
test(Labels): add spec to cover error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
keshandrr committed Apr 30, 2024
1 parent 7d9b037 commit d083532
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/api_resources/labels_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
unassign_label_from_screenshots = @crowdin.unassign_label_from_screenshots(label_id, {}, project_id)
expect(unassign_label_from_screenshots).to eq(200)
end

it 'returns error message when request was processed with an error' do
allow(RestClient::Request).to receive(:execute).and_raise('Error')
unassign_label_from_screenshots = @crowdin.unassign_label_from_screenshots(label_id, {}, project_id)
expect(unassign_label_from_screenshots).to eq('Error')
end
end
end
end

0 comments on commit d083532

Please sign in to comment.