diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-31 10:21:42 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-31 10:21:42 +0100 |
commit | bd5663bc3dc5d6901d9051a08d9ec4a8df24cca4 (patch) | |
tree | 25ac842b3d0cc27cb8fc7147c7b22bd9a5b25b49 /tests | |
parent | 64d0b0d18489e3cbacdfd826c84bdf16f8164268 (diff) | |
download | nextcloud-server-bd5663bc3dc5d6901d9051a08d9ec4a8df24cca4.tar.gz nextcloud-server-bd5663bc3dc5d6901d9051a08d9ec4a8df24cca4.zip |
adding unit tests for delete
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/ocs/privatedata.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/ocs/privatedata.php b/tests/lib/ocs/privatedata.php index 0a242bd5f8e..423bb2c96b6 100644 --- a/tests/lib/ocs/privatedata.php +++ b/tests/lib/ocs/privatedata.php @@ -75,6 +75,22 @@ class Test_OC_OCS_Privatedata extends PHPUnit_Framework_TestCase } /** + * @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 */ public function assertOcsResult($expectedArraySize, $result) { |