Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolín <sbertolin@solidgear.es>2016-06-14 19:20:40 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2016-06-15 15:21:59 +0300
commit4232458652d25afecd19783eb62db4e4d9517c5a (patch)
tree8a6762a991156ca3d37e21d97875d8e24b5e8362 /build
parent39a56c7bc165cc782142a0a92fe1ec8423ecfa3d (diff)
Fixing the tests
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/WebDav.php31
-rw-r--r--build/integration/features/favorites.feature10
2 files changed, 20 insertions, 21 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index a63e2a59218..10bd05cbbbf 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -435,20 +435,11 @@ trait WebDav {
}
}
- /*
- * @When user "([^"]*)" favorites folder "([^"]*)"
- * @param string $user
- * @param string $path
- * @param \Behat\Gherkin\Node\TableNode|null $propertiesTable
+ /**
+ * @When user :user favorites element :path
*/
- public function userFavoritesFolder($user, $path, $propertiesTable) {
- $properties = null;
- if ($propertiesTable instanceof \Behat\Gherkin\Node\TableNode) {
- foreach ($propertiesTable->getRows() as $row) {
- $properties[] = $row[0];
- }
- }
- $this->response = $this->favFolder($user, $path, 0, $properties);
+ public function userFavoritesFolder($user, $path){
+ $this->response = $this->favFolder($user, $path, 0, null);
}
/*Set the elements of a proppatch, $folderDepth requires 1 to see elements without children*/
@@ -466,11 +457,21 @@ trait WebDav {
$client = new SClient($settings);
if (!$properties) {
$properties = [
- '{http://owncloud.org/ns}favorite'
+ '{http://owncloud.org/ns}favorite' => 1
];
}
- echo $properties,
+
$response = $client->proppatch($this->davPath . '/' . ltrim($path, '/'), $properties, $folderDepth);
return $response;
}
+
+ /**
+ * @Then /^as "([^"]*)" gets properties of file "([^"]*)" with$/
+ * @param string $user
+ * @param string $path
+ * @param \Behat\Gherkin\Node\TableNode|null $propertiesTable
+ */
+ public function asGetsPropertiesOfFileWith($user, $path, $propertiesTable) {
+ $this->asGetsPropertiesOfFolderWith($user, $path, $propertiesTable);
+ }
}
diff --git a/build/integration/features/favorites.feature b/build/integration/features/favorites.feature
index 4b437d13bd5..8025f0834ff 100644
--- a/build/integration/features/favorites.feature
+++ b/build/integration/features/favorites.feature
@@ -6,9 +6,8 @@ Feature: favorite
Given using dav path "remote.php/webdav"
And As an "admin"
And user "user0" exists
- When user "user0" favorites folder "/"
- |{http://owncloud.org/ns}favorite|
- Then As "user0" gets properties of folder "/" with
+ When user "user0" favorites element "/FOLDER"
+ Then as "user0" gets properties of folder "/FOLDER" with
|{http://owncloud.org/ns}favorite|
And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1"
@@ -16,8 +15,7 @@ Feature: favorite
Given using dav path "remote.php/webdav"
And As an "admin"
And user "user0" exists
- When user "user0" favorites folder "/textfile0.txt"
- |{http://owncloud.org/ns}favorite|
- Then As "user0" gets properties of folder "/textfile0.txt" with
+ When user "user0" favorites element "/textfile0.txt"
+ Then as "user0" gets properties of file "/textfile0.txt" with
|{http://owncloud.org/ns}favorite|
And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" \ No newline at end of file