tests: add test cases for non-admin actions to admin resources

This commit is contained in:
Saw-jan
2024-07-18 16:17:52 +05:45
parent 81ef018b9f
commit dd8a3eb3d2
15 changed files with 273 additions and 48 deletions

View File

@@ -29,3 +29,15 @@ Feature: unassign user role
When user "Alice" tries to unassign the role of user "Alice" using the Graph API
Then the HTTP status code should be "403"
And user "Alice" should have the role "Admin" assigned
Scenario: non-admin user tries to unassign role of another user
Given user "Brian" has been created with default attributes and without skeleton files
When user "Alice" tries to unassign the role of user "Brian" using the Graph API
Then the HTTP status code should be "403"
And user "Brian" should have the role "User" assigned
Scenario: non-admin user tries to unassign role of nonexistent user
When user "Alice" tries to unassign the role of user "nonexistent" using the Graph API
Then the HTTP status code should be "403"