Skip to content

Commit

Permalink
test DELETE requests on OCS endpoints as admin with invalid password
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it committed Feb 28, 2019
1 parent 9ba3101 commit 7ef93e8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions tests/acceptance/features/apiMain/auth.feature
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,45 @@ Feature: auth
| 1 |
| 2 |

@issue-32068
Scenario Outline: send DELETE requests to OCS endpoints as admin with wrong password
Given using OCS API version "<ocs_api_version>"
And group "group1" has been created
When the administrator sends HTTP method "DELETE" to OCS API endpoint "<endpoint>" using password "invalid"
Then the OCS status code should be "<ocs-code>"
And the HTTP status code should be "<http-code>"
Examples:
| ocs_api_version |endpoint | ocs-code | http-code |
| 1 |/apps/files_sharing/api/v1/remote_shares/pending/123 | 997 | 401 |
| 2 |/apps/files_sharing/api/v1/remote_shares/pending/123 | 997 | 401 |
| 1 |/apps/files_sharing/api/v1/remote_shares/123 | 997 | 401 |
| 2 |/apps/files_sharing/api/v1/remote_shares/123 | 997 | 401 |
| 1 |/cloud/apps/testing | 997 | 401 |
| 2 |/cloud/apps/testing | 997 | 401 |
| 1 |/cloud/groups/group1 | 997 | 401 |
| 2 |/cloud/groups/group1 | 997 | 401 |
| 1 |/cloud/users/user0 | 997 | 401 |
| 2 |/cloud/users/user0 | 997 | 401 |
| 1 |/cloud/users/user0/groups | 997 | 401 |
| 2 |/cloud/users/user0/groups | 997 | 401 |
| 1 |/cloud/users/user0/subadmins | 997 | 401 |
| 2 |/cloud/users/user0/subadmins | 997 | 401 |

#merge into previous scenario when fixed
@issue-34626
Scenario Outline: send DELETE requests to OCS endpoints as admin with wrong password
Given using OCS API version "<ocs_api_version>"
When the administrator sends HTTP method "DELETE" to OCS API endpoint "<endpoint>" using password "invalid"
Then the HTTP status code should be "200"
And the body of the response should be empty
#And the OCS status code should be "997"
Examples:
| ocs_api_version | endpoint |
| 1 | /apps/files_sharing/api/v1/shares/123 |
| 2 | /apps/files_sharing/api/v1/shares/123 |
| 1 | /apps/files_sharing/api/v1/shares/pending/123 |
| 2 | /apps/files_sharing/api/v1/shares/pending/123 |

Scenario Outline: using OCS with token auth of a normal user
When user "user0" requests "<endpoint>" with "GET" using basic token auth
Then the OCS status code should be "<ocs-code>"
Expand Down

0 comments on commit 7ef93e8

Please sign in to comment.