Skip to content

Commit 2c7b525

Browse files
committed
test the user endpoint
1 parent 7c03f0d commit 2c7b525

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

features/user/security.feature

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ Feature: Prevent disabled users from logging in
5050
And the header "set-cookie" should contain "secure; httponly; samesite=lax"
5151
And the mercure cookie should not contain draft resource topics
5252

53+
@loginSuperAdmin
54+
Scenario: A logged in user can fetch a list of all users
55+
Given there is a user with the username "another_user" password "password" and role "ROLE_USER"
56+
When I send a "GET" request to "/users"
57+
Then the response status code should be 200
58+
And the JSON node "member" should have 2 elements
59+
And the JSON node "member[0].username" should be equal to "another_user"
60+
And the JSON node "member[1].username" should be equal to "new_user"
61+
5362
Scenario: A successful login
5463
Given there is a user with the username "admin" password "password" and role "ROLE_ADMIN"
5564
When I send a "POST" request to "/login" with body:

0 commit comments

Comments
 (0)