diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-09 18:11:30 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-09 18:11:30 +0100 |
commit | d19c47a381e478a59bb93acd2d75412ea3bfd11e (patch) | |
tree | 8f962113a8cc4a00cb4a900d8214c9e08471db77 /apps/provisioning_api | |
parent | 096115870cbe07eee246166bfbe93a37937d470a (diff) | |
download | nextcloud-server-d19c47a381e478a59bb93acd2d75412ea3bfd11e.tar.gz nextcloud-server-d19c47a381e478a59bb93acd2d75412ea3bfd11e.zip |
More fixed tests :)
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/tests/userstest.php | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/apps/provisioning_api/tests/userstest.php b/apps/provisioning_api/tests/userstest.php index 3ce13181b8d..859bc7228e9 100644 --- a/apps/provisioning_api/tests/userstest.php +++ b/apps/provisioning_api/tests/userstest.php @@ -1015,6 +1015,9 @@ class UsersTest extends OriginalTest { ->method('getUID') ->will($this->returnValue('UserToEdit')); $targetUser = $this->getMock('\OCP\IUser'); + $targetUser->expects($this->once()) + ->method('setQuota') + ->with('2.9 MB'); $this->userSession ->expects($this->once()) ->method('getUser') @@ -1029,10 +1032,6 @@ class UsersTest extends OriginalTest { ->method('isAdmin') ->with('UserToEdit') ->will($this->returnValue(true)); - $this->config - ->expects($this->once()) - ->method('setUserValue') - ->with('UserToEdit', 'files', 'quota', '2.9 MB'); $expected = new \OC_OCS_Result(null, 100); $this->assertEquals($expected, $this->api->editUser(['userid' => 'UserToEdit', '_put' => ['key' => 'quota', 'value' => '3042824']])); @@ -1071,6 +1070,9 @@ class UsersTest extends OriginalTest { ->method('getUID') ->will($this->returnValue('admin')); $targetUser = $this->getMock('\OCP\IUser'); + $targetUser->expects($this->once()) + ->method('setQuota') + ->with('2.9 MB'); $this->userSession ->expects($this->once()) ->method('getUser') @@ -1092,10 +1094,6 @@ class UsersTest extends OriginalTest { ->expects($this->once()) ->method('getSubAdmin') ->will($this->returnValue($subAdminManager)); - $this->config - ->expects($this->once()) - ->method('setUserValue') - ->with('UserToEdit', 'files', 'quota', '2.9 MB'); $expected = new \OC_OCS_Result(null, 100); $this->assertEquals($expected, $this->api->editUser(['userid' => 'UserToEdit', '_put' => ['key' => 'quota', 'value' => '3042824']])); @@ -1108,6 +1106,9 @@ class UsersTest extends OriginalTest { ->method('getUID') ->will($this->returnValue('subadmin')); $targetUser = $this->getMock('\OCP\IUser'); + $targetUser->expects($this->once()) + ->method('setQuota') + ->with('2.9 MB'); $this->userSession ->expects($this->once()) ->method('getUser') @@ -1129,10 +1130,6 @@ class UsersTest extends OriginalTest { ->expects($this->once()) ->method('getSubAdmin') ->will($this->returnValue($subAdminManager)); - $this->config - ->expects($this->once()) - ->method('setUserValue') - ->with('UserToEdit', 'files', 'quota', '2.9 MB'); $expected = new \OC_OCS_Result(null, 100); $this->assertEquals($expected, $this->api->editUser(['userid' => 'UserToEdit', '_put' => ['key' => 'quota', 'value' => '3042824']])); |