mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-12 01:55:57 -04:00
test: updated test expectation
This commit is contained in:
@@ -140,7 +140,7 @@ Feature: add users to group
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"enum": ["Unauthorized"]
|
||||
"enum": ["Forbidden"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ Feature: add users to group
|
||||
"properties": {
|
||||
"message" : {
|
||||
"type": "string",
|
||||
"enum": ["Unauthorized"]
|
||||
"enum": ["Forbidden"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ Feature: create user
|
||||
| email | @example.org |
|
||||
| password | 123 |
|
||||
| accountEnabled | true |
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And user "user" should not exist
|
||||
Examples:
|
||||
| user-role |
|
||||
|
||||
@@ -60,7 +60,7 @@ Feature: delete user
|
||||
Scenario Outline: non-admin user tries to delete his/her own account
|
||||
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
|
||||
When the user "Alice" deletes a user "Alice" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And user "Alice" should exist
|
||||
Examples:
|
||||
| user-role |
|
||||
@@ -78,7 +78,7 @@ Feature: delete user
|
||||
Scenario Outline: non-admin user tries to delete a nonexistent user
|
||||
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
|
||||
When the user "Alice" tries to delete a nonexistent user using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
Examples:
|
||||
| user-role |
|
||||
| Space Admin |
|
||||
@@ -91,7 +91,7 @@ Feature: delete user
|
||||
And the administrator has assigned the role "<user-role-2>" to user "Brian" using the Graph API
|
||||
And the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
|
||||
When the user "Alice" deletes a user "Brian" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And user "Brian" should exist
|
||||
Examples:
|
||||
| user-role | user-role-2 |
|
||||
@@ -126,7 +126,7 @@ Feature: delete user
|
||||
And the administrator has assigned the role "<user-role>" to user "Carol" using the Graph API
|
||||
And the user "Alice" has disabled user "Brian"
|
||||
When the user "Carol" deletes a user "Brian" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And user "Brian" should exist
|
||||
Examples:
|
||||
| user-role | user-role-2 |
|
||||
|
||||
@@ -123,7 +123,7 @@ Feature: edit user
|
||||
Scenario Outline: normal user should not be able to change his/her own display name
|
||||
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
|
||||
When the user "Brian" tries to change the display name of user "Brian" to "Brian Murphy" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And the user information of "Alice" should match this JSON schema
|
||||
"""
|
||||
{
|
||||
@@ -155,7 +155,7 @@ Feature: edit user
|
||||
| password | 1234 |
|
||||
And the administrator has assigned the role "<user-role-2>" to user "Carol" using the Graph API
|
||||
When the user "Brian" tries to change the display name of user "Carol" to "Alice Hansen" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And the user information of "Carol" should match this JSON schema
|
||||
"""
|
||||
{
|
||||
@@ -204,7 +204,7 @@ Feature: edit user
|
||||
And the administrator has assigned the role "<user-role-2>" to user "Carol" using the Graph API
|
||||
And user "Carol" has uploaded file with content "test file for reset password" to "/resetpassword.txt"
|
||||
When the user "Brian" resets the password of user "Carol" to "newpassword" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And the content of file "resetpassword.txt" for user "Carol" using password "1234" should be "test file for reset password"
|
||||
But user "Carol" using password "newpassword" should not be able to download file "resetpassword.txt"
|
||||
Examples:
|
||||
@@ -264,7 +264,7 @@ Feature: edit user
|
||||
Given user "Carol" has been created with default attributes and without skeleton files
|
||||
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
|
||||
When the user "Brian" tries to disable user "Carol" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
When user "Alice" gets information of user "Carol" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
@@ -347,7 +347,7 @@ Feature: edit user
|
||||
And the user "Alice" has disabled user "Carol"
|
||||
And the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
|
||||
When the user "Brian" tries to enable user "Carol" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
When user "Alice" gets information of user "Carol" using Graph API
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
|
||||
@@ -95,7 +95,7 @@ Feature: get groups and their members
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"enum": ["Unauthorized"]
|
||||
"enum": ["Forbidden"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ Feature: remove a user from a group
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"enum": ["Unauthorized"]
|
||||
"enum": ["Forbidden"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Feature: edit/search user including email
|
||||
Scenario Outline: normal user should not be able to change their email address
|
||||
Given the administrator has assigned the role "<user-role>" to user "Brian" using the Graph API
|
||||
When the user "Brian" tries to change the email of user "Brian" to "newemail@example.com" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And the user information of "Brian" should match this JSON schema
|
||||
"""
|
||||
{
|
||||
@@ -68,7 +68,7 @@ Feature: edit/search user including email
|
||||
| password | 1234 |
|
||||
And the administrator has assigned the role "<user-role-2>" to user "Carol" using the Graph API
|
||||
When the user "Brian" tries to change the email of user "Carol" to "newemail@example.com" using the Graph API
|
||||
Then the HTTP status code should be "401"
|
||||
Then the HTTP status code should be "403"
|
||||
And the user information of "Carol" should match this JSON schema
|
||||
"""
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user