diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-21 13:05:23 +0300 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-10-21 21:05:14 +0300 |
commit | 9b64fa7b920d8ab1d713f1cc098c91107fead534 (patch) | |
tree | c643be68d66cbd94aab87b75baf28c44e1ac1108 /apps/provisioning_api | |
parent | f7f2a160dd2fa3a5ad56a854cbe0fb6c522badcd (diff) |
[provisioning api] losen test
Since we have no control of how backends sort their list of users and we
also don't want to sort yet another time the test now just checks if the
correct number of elements is returned and if they are from the list of
group members.
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/tests/userstest.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/provisioning_api/tests/userstest.php b/apps/provisioning_api/tests/userstest.php index 673383edae6..b43041bbbf9 100644 --- a/apps/provisioning_api/tests/userstest.php +++ b/apps/provisioning_api/tests/userstest.php @@ -151,7 +151,20 @@ class UsersTest extends TestCase { $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertTrue($result->succeeded()); - $this->assertEquals(['users' => array_slice($uids, 1, 2)], $result->getData()); + + // Disable this test for now since sorting is not done the same on all backends + //$this->assertEquals(['users' => array_slice($uids, 1, 2)], $result->getData()); + + $this->assertCount(2, $result->getData()['users']); + + $counter = 0; + foreach ($uids as $uid) { + if (in_array($uid, $result->getData()['users'], true)) { + $counter += 1; + } + } + + $this->assertEquals(2, $counter); } public function testGetUsersNoUser() { |