summaryrefslogtreecommitdiff
path: root/tests/units/UserTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/UserTest.php')
-rw-r--r--tests/units/UserTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/units/UserTest.php b/tests/units/UserTest.php
index 6c68dfd2..e3fa5f76 100644
--- a/tests/units/UserTest.php
+++ b/tests/units/UserTest.php
@@ -112,6 +112,7 @@ class UserTest extends Base
$u = new User($this->container);
$this->assertNotFalse($u->create(array('username' => 'toto', 'password' => '123456', 'name' => 'Toto')));
$this->assertNotFalse($u->create(array('username' => 'titi', 'is_ldap_user' => 1)));
+ $this->assertNotFalse($u->create(array('username' => 'papa', 'is_project_admin' => 1)));
$this->assertFalse($u->create(array('username' => 'toto')));
$user = $u->getById(1);
@@ -137,6 +138,13 @@ class UserTest extends Base
$this->assertEquals('', $user['name']);
$this->assertEquals(0, $user['is_admin']);
$this->assertEquals(1, $user['is_ldap_user']);
+
+ $user = $u->getById(4);
+ $this->assertNotFalse($user);
+ $this->assertTrue(is_array($user));
+ $this->assertEquals('papa', $user['username']);
+ $this->assertEquals(0, $user['is_admin']);
+ $this->assertEquals(1, $user['is_project_admin']);
}
public function testUpdate()