-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Gabriel <[email protected]>
- Loading branch information
1 parent
6ae1dd0
commit f0c50ce
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,7 +241,7 @@ | |
create(:schedule_item, schedule: schedule, responsible_email: "[email protected]") | ||
speaker = Speaker.last | ||
|
||
get "/api/v1/speakers/#{speaker.code}/events/#{event.code}" | ||
get "/api/v1/speakers/#{speaker.code}/event/#{event.code}" | ||
|
||
json_response = JSON.parse(response.body) | ||
expect(json_response['name']).to eq 'Tropical Rails Fake' | ||
|
@@ -255,7 +255,7 @@ | |
schedule = create(:schedule, event: event) | ||
create(:schedule_item, schedule: schedule, responsible_email: "[email protected]") | ||
|
||
get "/api/v1/speakers/INVALID_CODE/events/#{event.code}" | ||
get "/api/v1/speakers/INVALID_CODE/event/#{event.code}" | ||
|
||
json_response = JSON.parse(response.body) | ||
expect(json_response["error"]). to eq 'Código não pertence a nenhum palestrante.' | ||
|
@@ -270,7 +270,7 @@ | |
create(:schedule_item, schedule: schedule, responsible_email: "[email protected]") | ||
speaker = Speaker.last | ||
|
||
get "/api/v1/speakers/#{speaker.code}/events/INVALID_CODE" | ||
get "/api/v1/speakers/#{speaker.code}/event/INVALID_CODE" | ||
|
||
json_response = JSON.parse(response.body) | ||
expect(json_response["error"]). to eq 'Palestrante não possui nenhum evento com esse código.' | ||
|
@@ -286,7 +286,7 @@ | |
speaker = Speaker.last | ||
allow(Speaker).to receive(:find_by).and_raise(ActiveRecord::ActiveRecordError) | ||
|
||
get "/api/v1/speakers/#{speaker.code}/events/#{event.code}" | ||
get "/api/v1/speakers/#{speaker.code}/event/#{event.code}" | ||
|
||
expect(response.status).to eq 500 | ||
end | ||
|