Skip to content

Commit

Permalink
Merge pull request #32307 from owncloud/separateGivenWhenStepGroupCre…
Browse files Browse the repository at this point in the history
…ation

separate When from the Given step in acceptance tests
  • Loading branch information
individual-it authored Aug 13, 2018
2 parents a43851e + 8b82879 commit 874acce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ So that I can see all the groups in my ownCloud
Scenario: admin gets all the groups
Given group "0" has been created
And group "new-group" has been created
And group "admin" has been created
And group "España" has been created
When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/groups"
Then the groups returned by the API should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ So that I can see all the groups in my ownCloud
Scenario: admin gets all the groups
Given group "0" has been created
And group "new-group" has been created
And group "admin" has been created
And group "España" has been created
When user "admin" sends HTTP method "GET" to OCS API endpoint "/cloud/groups"
Then the groups returned by the API should be
Expand Down
13 changes: 12 additions & 1 deletion tests/acceptance/features/bootstrap/Provisioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ public function rememberThatGroupIsNotExpectedToExist($group) {

/**
* @When /^the administrator creates group "([^"]*)" using the provisioning API$/
* @Given /^group "([^"]*)" has been created$/
*
* @param string $group
*
Expand All @@ -920,6 +919,18 @@ public function adminCreatesGroupUsingTheProvisioningApi($group) {
$this->groupShouldExist($group);
}

/** @Given /^group "([^"]*)" has been created$/
*
* @param string $group
*
* @return void
* @throws \Exception
*/
public function groupHasBeenCreated($group) {
$this->createTheGroup($group);
$this->groupShouldExist($group);
}

/**
* @Given these groups have been created:
* expects a table of groups with the heading "groupname"
Expand Down

0 comments on commit 874acce

Please sign in to comment.