summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2015-10-22 12:15:51 +0000
committerSergio Bertolin <sbertolin@solidgear.es>2015-10-22 12:15:51 +0000
commit5e9dc381b44bff03764dd3e14d2afbb9b07c952b (patch)
treeb46ec93a3a735d95a5a09a4ca8c4162ac1e93dba /build
parente47160083470ba8c62ccb2b2ff1f630146fa8a34 (diff)
downloadnextcloud-server-5e9dc381b44bff03764dd3e14d2afbb9b07c952b.tar.gz
nextcloud-server-5e9dc381b44bff03764dd3e14d2afbb9b07c952b.zip
added test for getting users of a group being subadmin
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/FeatureContext.php2
-rw-r--r--build/integration/features/provisioning-v1.feature33
2 files changed, 24 insertions, 11 deletions
diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php
index e05015301f3..45dd23ddf17 100644
--- a/build/integration/features/bootstrap/FeatureContext.php
+++ b/build/integration/features/bootstrap/FeatureContext.php
@@ -352,7 +352,7 @@ class FeatureContext extends BehatContext {
if ($this->currentUser === 'admin') {
$options['auth'] = $this->adminUser;
} else {
- $options['auth'] = $this->regularUser;
+ $options['auth'] = [$this->currentUser, $this->regularUser];
}
if ($body instanceof \Behat\Gherkin\Node\TableNode) {
$fd = $body->getRowsHash();
diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature
index 53fd70ee999..3a291c1b69c 100644
--- a/build/integration/features/provisioning-v1.feature
+++ b/build/integration/features/provisioning-v1.feature
@@ -112,16 +112,6 @@ Feature: provisioning
| new-group |
And the OCS status code should be "100"
- Scenario: removing a user from a group
- Given As an "admin"
- And user "brand-new-user" exists
- And group "new-group" exists
- And user "brand-new-user" belongs to group "new-group"
- When sending "DELETE" to "/cloud/users/brand-new-user/groups" with
- | groupid | new-group |
- Then the OCS status code should be "100"
- And user "brand-new-user" does not belong to group "new-group"
-
Scenario: adding a user which doesn't exist to a group
Given As an "admin"
And user "not-user" does not exist
@@ -156,6 +146,29 @@ Feature: provisioning
Then the OCS status code should be "100"
And the HTTP status code should be "200"
+ Scenario: get users using a subadmin
+ Given As an "admin"
+ And user "brand-new-user" exists
+ And group "new-group" exists
+ And user "brand-new-user" belongs to group "new-group"
+ And user "brand-new-user" is subadmin of group "new-group"
+ And As an "brand-new-user"
+ When sending "GET" to "/cloud/users"
+ Then users returned are
+ | brand-new-user |
+ And the OCS status code should be "100"
+ And the HTTP status code should be "200"
+
+ Scenario: removing a user from a group
+ Given As an "admin"
+ And user "brand-new-user" exists
+ And group "new-group" exists
+ And user "brand-new-user" belongs to group "new-group"
+ When sending "DELETE" to "/cloud/users/brand-new-user/groups" with
+ | groupid | new-group |
+ Then the OCS status code should be "100"
+ And user "brand-new-user" does not belong to group "new-group"
+
Scenario: create a subadmin using a user which not exist
Given As an "admin"
And user "not-user" does not exist