Skip to content

Commit

Permalink
[tests-only][full-ci]Json assertion apigraph master branch (#5989)
Browse files Browse the repository at this point in the history
* Json assertion for api graph suite

* Review Address
  • Loading branch information
SagarGi authored Apr 5, 2023
1 parent adfbddf commit b52597d
Show file tree
Hide file tree
Showing 9 changed files with 1,614 additions and 426 deletions.
104 changes: 52 additions & 52 deletions tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md

Large diffs are not rendered by default.

44 changes: 42 additions & 2 deletions tests/acceptance/features/apiGraph/addUserToGroup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,27 @@ Feature: add users to group
And group "groupA" has been created
When user "Alice" tries to add himself to group "groupA" using the Graph API
Then the HTTP status code should be "403"
And the last response should be an unauthorized response
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"type": "string",
"enum": ["Unauthorized"]
}
}
}
}
"""
Examples:
| role |
| Space Admin |
Expand All @@ -139,7 +159,27 @@ Feature: add users to group
And group "groupA" has been created
When user "Alice" tries to add user "Brian" to group "groupA" using the Graph API
Then the HTTP status code should be "403"
And the last response should be an unauthorized response
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message"
],
"properties": {
"type": "string",
"enum": ["Unauthorized"]
}
}
}
}
"""
Examples:
| role |
| Space Admin |
Expand Down
Loading

0 comments on commit b52597d

Please sign in to comment.