File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
tests/acceptance/features Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,20 @@ public function theAdministratorGetsTheGroupsUsingTheOccCommand() {
303
303
);
304
304
}
305
305
306
+ /**
307
+ * @When the administrator removes user :username from group :group using the occ command
308
+ *
309
+ * @param string $username
310
+ * @param string $group
311
+ *
312
+ * @return void
313
+ */
314
+ public function theAdministratorRemovesUserFromGroupUsingTheOccCommand ($ username , $ group ) {
315
+ $ this ->featureContext ->invokingTheCommand (
316
+ "group:remove-member -m $ username $ group "
317
+ );
318
+ }
319
+
306
320
/**
307
321
* @When the administrator disables the app :appName using the occ command
308
322
*
Original file line number Diff line number Diff line change
1
+ @cli @skipOnLDAP
2
+ Feature : remove a user from a group
3
+ As an admin
4
+ I want to be able to remove a user from a group
5
+ So that I can manage user access to group resources
6
+
7
+ Scenario Outline : admin removes a user from a group
8
+ Given user "brand-new-user" has been created
9
+ And group "<group_id>" has been created
10
+ And user "brand-new-user" has been added to group "<group_id>"
11
+ When the administrator removes user "brand-new-user" from group "<group_id>" using the occ command
12
+ Then the command should have been successful
13
+ And the command output should contain the text 'Member "brand-new-user" removed from group "<group_id>"'
14
+ And user "brand-new-user" should not belong to group "<group_id>"
15
+ Examples :
16
+ | group_id | comment |
17
+ | simplegroup | nothing special here |
18
+ | Espa ña | special European characters |
19
+ | नेपाली | Unicode group name |
20
+
21
+ Scenario : admin tries to remove a user from a group which does not exist
22
+ Given user "brand-new-user" has been created
23
+ And group "not-group" has been deleted
24
+ When the administrator removes user "brand-new-user" from group "not-group" using the occ command
25
+ Then the command should have failed with exit code 1
26
+ And the command output should contain the text 'Group "not-group" does not exist'
You can’t perform that action at this time.
0 commit comments