]> source.dussan.org Git - nextcloud-server.git/commitdiff
adding unit tests for delete
authorThomas Müller <thomas.mueller@tmit.eu>
Thu, 31 Oct 2013 09:21:42 +0000 (10:21 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 31 Oct 2013 09:21:42 +0000 (10:21 +0100)
tests/lib/ocs/privatedata.php

index 0a242bd5f8e6d0f53b1e8107407a44aad380be5e..423bb2c96b6280c47d0c69f4209ea58b6abfb759 100644 (file)
@@ -74,6 +74,22 @@ class Test_OC_OCS_Privatedata extends PHPUnit_Framework_TestCase
                $this->assertOcsResult(2, $result);
        }
 
+       /**
+        * @dataProvider deleteWithEmptyKeysProvider
+        */
+       public function testDeleteWithEmptyKeys($params) {
+               $result = OC_OCS_Privatedata::delete($params);
+               $this->assertEquals(101, $result->getStatusCode());
+       }
+
+       public function deleteWithEmptyKeysProvider() {
+               return array(
+                       array(array()),
+                       array(array('app' => '123')),
+                       array(array('key' => '123')),
+               );
+       }
+
        /**
         * @param \OC_OCS_Result $result
         */