diff options
| author | Frederic Guillot <fred@kanboard.net> | 2015-08-14 15:43:08 -0400 |
|---|---|---|
| committer | Frederic Guillot <fred@kanboard.net> | 2015-08-14 15:43:08 -0400 |
| commit | b2cce5a3a1a0be68102e614b42d2ee6a030bd523 (patch) | |
| tree | 0014f4362cee39f98727276bc79aa96adc213fee /tests/units/UserTest.php | |
| parent | 80fb3bc9aa842ef75f1f8282db63ca43282aacd7 (diff) | |
Add new role Project Administrator
Diffstat (limited to 'tests/units/UserTest.php')
| -rw-r--r-- | tests/units/UserTest.php | 8 |
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() |
