Merge pull request #8018 from owncloud/ocs_result_success_is_100
OC_OCS_Result Class, Only accept 100 code as success
This commit is contained in:
commit
6cc578d1a7
|
@ -96,7 +96,7 @@ class OC_OCS_Result{
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function succeeded() {
|
public function succeeded() {
|
||||||
return (substr($this->statusCode, 0, 1) === '1');
|
return ($this->statusCode == 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Test_API extends PHPUnit_Framework_TestCase {
|
||||||
function dataProviderTestOneResult() {
|
function dataProviderTestOneResult() {
|
||||||
return array(
|
return array(
|
||||||
array(100, true),
|
array(100, true),
|
||||||
array(101, true),
|
array(101, false),
|
||||||
array(997, false),
|
array(997, false),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue