summaryrefslogtreecommitdiffstats
path: root/build/integration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-12-05 16:51:16 +0100
committerJoas Schilling <coding@schilljs.com>2016-12-06 16:30:21 +0100
commitb8e9d255d30a6b3429d94655608cbe02b634c9f1 (patch)
tree53d23c246891599b07dc69f90724e6b394c74301 /build/integration
parentb1901534be20ab768c4f5dccaa5c7c81fb472aa8 (diff)
downloadnextcloud-server-b8e9d255d30a6b3429d94655608cbe02b634c9f1.tar.gz
nextcloud-server-b8e9d255d30a6b3429d94655608cbe02b634c9f1.zip
Only allow admins to delete tags
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'build/integration')
-rw-r--r--build/integration/features/tags.feature13
1 files changed, 10 insertions, 3 deletions
diff --git a/build/integration/features/tags.feature b/build/integration/features/tags.feature
index d793c0d3c61..f11fde53f88 100644
--- a/build/integration/features/tags.feature
+++ b/build/integration/features/tags.feature
@@ -70,12 +70,13 @@ Feature: tags
When "user0" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3"
Then The response should have a status code "403"
- Scenario: Deleting a normal tag as regular user should work
+ Scenario: Deleting a normal tag as regular user should fail
Given user "user0" exists
Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName"
When "user0" deletes the tag with name "MySuperAwesomeTagName"
- Then The response should have a status code "204"
- And "0" tags should exist for "admin"
+ Then The response should have a status code "403"
+ And The following tags should exist for "admin"
+ |MySuperAwesomeTagName|true|true|
Scenario: Deleting a not user-assignable tag as regular user should fail
Given user "user0" exists
@@ -93,6 +94,12 @@ Feature: tags
And The following tags should exist for "admin"
|MySuperAwesomeTagName|false|true|
+ Scenario: Deleting a normal tag as admin should work
+ Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName"
+ When "admin" deletes the tag with name "MySuperAwesomeTagName"
+ Then The response should have a status code "204"
+ And "0" tags should exist for "admin"
+
Scenario: Deleting a not user-assignable tag as admin should work
Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName"
When "admin" deletes the tag with name "MySuperAwesomeTagName"