summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2016-11-24 14:13:58 +0000
committerLukas Reschke <lukas@statuscode.ch>2016-12-22 12:50:15 +0100
commitb0a3b2572454b9da0e48fa39d5a967d5b02fef94 (patch)
treefc1419418eed95ca55fc9596b7679d1174f66874 /build
parentfbbd833ed1e8afde2b73334d3e2f86df303a4274 (diff)
downloadnextcloud-server-b0a3b2572454b9da0e48fa39d5a967d5b02fef94.tar.gz
nextcloud-server-b0a3b2572454b9da0e48fa39d5a967d5b02fef94.zip
Added functionaly for not shared elements
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/TagsContext.php8
-rw-r--r--build/integration/features/tags.feature9
2 files changed, 13 insertions, 4 deletions
diff --git a/build/integration/features/bootstrap/TagsContext.php b/build/integration/features/bootstrap/TagsContext.php
index 91fb585d640..46ce869c86a 100644
--- a/build/integration/features/bootstrap/TagsContext.php
+++ b/build/integration/features/bootstrap/TagsContext.php
@@ -516,13 +516,13 @@ class TagsContext implements \Behat\Behat\Context\Context {
}
/**
- * @When :taggingUser adds the tag :tagName to :fileName shared by :sharingUser
+ * @When /^"([^"]*)" adds the tag "([^"]*)" to "([^"]*)" (shared|owned) by "([^"]*)"$/
* @param string $taggingUser
* @param string $tagName
* @param string $fileName
* @param string $sharingUser
*/
- public function addsTheTagToSharedBy($taggingUser, $tagName, $fileName, $sharingUser) {
+ public function addsTheTagToSharedBy($taggingUser, $tagName, $fileName, $sharedOrOwnedBy, $sharingUser) {
$fileId = $this->getFileIdForPath($fileName, $sharingUser);
$tagId = $this->findTagIdByName($tagName);
@@ -542,13 +542,13 @@ class TagsContext implements \Behat\Behat\Context\Context {
}
/**
- * @Then :fileName shared by :sharingUser has the following tags
+ * @Then /^"([^"]*)" (shared|owned) by "([^"]*)" has the following tags$/
* @param string $fileName
* @param string $sharingUser
* @param TableNode $table
* @throws \Exception
*/
- public function sharedByHasTheFollowingTags($fileName, $sharingUser, TableNode $table) {
+ public function sharedByHasTheFollowingTags($fileName, $sharedOrOwnedBy, $sharingUser, TableNode $table) {
$loadedExpectedTags = $table->getTable();
$expectedTags = [];
foreach($loadedExpectedTags as $expected) {
diff --git a/build/integration/features/tags.feature b/build/integration/features/tags.feature
index d793c0d3c61..35784419080 100644
--- a/build/integration/features/tags.feature
+++ b/build/integration/features/tags.feature
@@ -425,3 +425,12 @@ Feature: tags
Then The response should have a status code "201"
And the user "user0" cannot assign the "not user-assignable" tag with name "TagWithGroups"
+ Scenario: Assign a normal tag to a file
+ Given user "user0" exists
+ And "admin" creates a "normal" tag with name "Etiqueta"
+ And As an "user0"
+ When "user0" adds the tag "Etiqueta" to "/textfile0.txt" owned by "user0"
+ Then The response should have a status code "201"
+ And "textfile0.txt" owned by "user0" has the following tags
+ | Etiqueta |
+