summaryrefslogtreecommitdiff
path: root/tests/units/Model/UserTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-24 22:41:13 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-24 22:41:21 -0400
commita2e5d022e5fd652c7e37e9d9550deb3cf2cb41c8 (patch)
tree4564133b9c4545c585384d196c77d2561d8c79d4 /tests/units/Model/UserTest.php
parent5b30cd43d4c4197f40fde979e4afdd4ff2518442 (diff)
Clean up unit tests
Diffstat (limited to 'tests/units/Model/UserTest.php')
-rw-r--r--tests/units/Model/UserTest.php14
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/units/Model/UserTest.php b/tests/units/Model/UserTest.php
index 7501f2e0..b53acb7d 100644
--- a/tests/units/Model/UserTest.php
+++ b/tests/units/Model/UserTest.php
@@ -246,45 +246,33 @@ class UserTest extends Base
$this->assertFalse($u->create(array('username' => 'user #1')));
$user = $u->getById(1);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('admin', $user['username']);
$this->assertEquals('', $user['name']);
$this->assertEquals(Role::APP_ADMIN, $user['role']);
$this->assertEquals(0, $user['is_ldap_user']);
$user = $u->getById(2);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('user #1', $user['username']);
$this->assertEquals('User', $user['name']);
$this->assertEquals(Role::APP_USER, $user['role']);
$this->assertEquals(0, $user['is_ldap_user']);
$user = $u->getById(3);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('user #2', $user['username']);
$this->assertEquals('', $user['name']);
$this->assertEquals(Role::APP_USER, $user['role']);
$this->assertEquals(1, $user['is_ldap_user']);
$user = $u->getById(4);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('user #3', $user['username']);
$this->assertEquals(Role::APP_MANAGER, $user['role']);
$user = $u->getById(5);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('user #4', $user['username']);
$this->assertEquals('', $user['gitlab_id']);
$this->assertEquals(Role::APP_ADMIN, $user['role']);
$user = $u->getById(6);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('user #5', $user['username']);
$this->assertEquals('1234', $user['gitlab_id']);
$this->assertEquals(Role::APP_USER, $user['role']);
@@ -300,8 +288,6 @@ class UserTest extends Base
$this->assertTrue($u->update(array('id' => 3, 'gitlab_id' => '')));
$user = $u->getById(2);
- $this->assertNotFalse($user);
- $this->assertTrue(is_array($user));
$this->assertEquals('biloute', $user['username']);
$this->assertEquals('Toto', $user['name']);
$this->assertEquals(Role::APP_USER, $user['role']);