-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use @ for all references in Gherkin features + explicit name for ever…
…ything Signed-off-by: Geoffrey Huck <geoffrey@geot.fr>
- Loading branch information
1 parent
c9687fb
commit 26ffdc1
Showing
10 changed files
with
118 additions
and
134 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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
Feature: List threads - robustness | ||
Scenario: Should be logged in | ||
Given there is a group Classroom referenced by @Classroom | ||
Given there is a group @Classroom | ||
When I send a GET request to "/threads?watched_group_id=@Classroom" | ||
Then the response code should be 401 | ||
And the response error message should contain "No access token provided" | ||
|
||
Scenario: watched_group_id should be an integer | ||
Given I am John | ||
Given I am @John | ||
When I send a GET request to "/threads?watched_group_id=aaa" | ||
Then the response code should be 400 | ||
And the response error message should contain "Wrong value for watched_group_id (should be int64)" | ||
|
||
Scenario: watched_group_id should be given because the alternative is not implemented yet | ||
Given I am John | ||
Given I am @John | ||
When I send a GET request to "/threads" | ||
Then the response code should be 400 | ||
And the response error message should contain "Not implemented yet: watchedGroupID must be given" | ||
|
||
Scenario: The user should be a manager of watched_group_id group | ||
Given I am John | ||
And there is a group Classroom referenced by @Classroom | ||
Given I am @John | ||
And there is a group @Classroom | ||
When I send a GET request to "/threads?watched_group_id=@Classroom" | ||
Then the response code should be 403 | ||
And the response error message should contain "No rights to watch for watched_group_id" | ||
|
||
Scenario: The user should be able to watch the watched_group_id group | ||
Given I am John | ||
And there is a group Classroom referenced by @Classroom | ||
And I am a manager of the group Classroom | ||
Given I am @John | ||
And there is a group @Classroom | ||
And I am a manager of the group @Classroom | ||
When I send a GET request to "/threads?watched_group_id=@Classroom" | ||
Then the response code should be 403 | ||
And the response error message should contain "No rights to watch for watched_group_id" |
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
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
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
Oops, something went wrong.