diff options
author | Frédéric Guillot <contact@fredericguillot.com> | 2014-03-05 19:47:46 -0500 |
---|---|---|
committer | Frédéric Guillot <contact@fredericguillot.com> | 2014-03-05 19:47:46 -0500 |
commit | 5d9b5aee6d70de0c1cbd6abe79a22a6c51719069 (patch) | |
tree | 8c89ad98effb80681882853e728fc4d2c80a396a /tests | |
parent | 1d94ba9914751b6acd742e5538263b0f394e9189 (diff) | |
parent | 850abb1500a2785e64c0ac7aa621ec55920439c4 (diff) |
Merge branch 'patch-1' of github.com:toomyem/kanboard
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ProjectTest.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/ProjectTest.php b/tests/ProjectTest.php index 6eb39f52..33a35168 100644 --- a/tests/ProjectTest.php +++ b/tests/ProjectTest.php @@ -57,7 +57,13 @@ class ProjectTest extends PHPUnit_Framework_TestCase $this->assertTrue($p->revokeUser(1, 1)); $this->assertEquals(array('2' => 'unittest'), $p->getAllowedUsers(1)); - $this->assertFalse($p->isUserAllowed(1, 1)); + $this->assertTrue($p->isUserAllowed(1, 1)); // has admin priviledges $this->assertTrue($p->isUserAllowed(1, 2)); + + // Check if revoked regular user is not allowed + $this->assertTrue($p->allowUser(1, 1)); + $this->assertTrue($p->revokeUser(1, 2)); + $this->assertEquals(array('1' => 'admin'), $p->getAllowedUsers(1)); + $this->assertFalse($p->isUserAllowed(1, 2)); // regulat user is not allowed } } |