Browse Source

Return explicit values instead of boolean from sabre (#26654)

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
tags/v12.0.0beta1
Sergio Bertolín 7 years ago
parent
commit
928f113361
No account linked to committer's email address

+ 5
- 1
apps/dav/lib/Connector/Sabre/TagsPlugin.php View File

@@ -250,7 +250,11 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
if (is_null($isFav)) {
list(, $isFav) = $this->getTagsAndFav($node->getId());
}
return $isFav;
if ($isFav) {
return 1;
} else {
return 0;
}
});
}


+ 4
- 4
build/integration/features/favorites.feature View File

@@ -19,7 +19,7 @@ Feature: favorite
And user "user0" unfavorites 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 ""
And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"

Scenario: Favorite a file
Given using old dav path
@@ -38,7 +38,7 @@ Feature: favorite
And user "user0" unfavorites 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 ""
And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"

Scenario: Favorite a folder new endpoint
Given using new dav path
@@ -57,7 +57,7 @@ Feature: favorite
And user "user0" unfavorites 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 ""
And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"

Scenario: Favorite a file new endpoint
Given using new dav path
@@ -76,5 +76,5 @@ Feature: favorite
And user "user0" unfavorites 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 ""
And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0"


Loading…
Cancel
Save