diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-24 18:37:17 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-24 18:37:17 -0500 |
commit | 60f3d7f83d23014f9cfb7d8494d6cebd2f8b24a3 (patch) | |
tree | 07d57c18d7e5503d6ae7aa1d663128072f9027f5 | |
parent | abcfd02067b348e1c86f61e7545b93f87ea89569 (diff) |
Fix broken test
-rw-r--r-- | tests/units/Helper/UserHelperTest.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/units/Helper/UserHelperTest.php b/tests/units/Helper/UserHelperTest.php index 2b503157..67ccee73 100644 --- a/tests/units/Helper/UserHelperTest.php +++ b/tests/units/Helper/UserHelperTest.php @@ -80,7 +80,7 @@ class UserHelperTest extends Base $this->assertEquals(1, $project->create(array('name' => 'My project'))); - $this->assertTrue($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertTrue($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); } @@ -96,7 +96,7 @@ class UserHelperTest extends Base $this->assertEquals(1, $project->create(array('name' => 'My project'))); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 1)); } @@ -112,7 +112,7 @@ class UserHelperTest extends Base $this->assertEquals(1, $project->create(array('name' => 'My project'))); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 1)); } @@ -133,12 +133,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MANAGER)); - $this->assertTrue($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertTrue($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); @@ -161,12 +161,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MANAGER)); - $this->assertTrue($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertTrue($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); @@ -189,12 +189,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MEMBER)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); @@ -217,12 +217,12 @@ class UserHelperTest extends Base $this->assertEquals(2, $user->create(array('username' => 'user'))); $this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_VIEWER)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 1)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 1)); $this->assertTrue($helper->hasProjectAccess('board', 'show', 1)); $this->assertTrue($helper->hasProjectAccess('task', 'show', 1)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 1)); - $this->assertFalse($helper->hasProjectAccess('project', 'edit', 2)); + $this->assertFalse($helper->hasProjectAccess('ProjectEdit', 'edit', 2)); $this->assertFalse($helper->hasProjectAccess('board', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('task', 'show', 2)); $this->assertFalse($helper->hasProjectAccess('taskcreation', 'save', 2)); |