summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-28 14:05:57 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-28 14:05:57 -0400
commit8d12e2fe736a72d6ad69807ac853a7e325c8cbf3 (patch)
treeea18a49b44db9bfa55c7e09ee8c939a98b088239 /tests/units
parent1353929a7dbd3f2e897fa7d3ab88e959ca573f9f (diff)
Split board controller into multiple classes
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Helper/UserHelperTest.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/units/Helper/UserHelperTest.php b/tests/units/Helper/UserHelperTest.php
index 3c21f7f1..be563b47 100644
--- a/tests/units/Helper/UserHelperTest.php
+++ b/tests/units/Helper/UserHelperTest.php
@@ -86,7 +86,7 @@ class UserHelperTest extends Base
$this->assertEquals(1, $project->create(array('name' => 'My project')));
$this->assertTrue($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertTrue($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertTrue($helper->hasProjectAccess('BoardViewController', 'show', 1));
}
public function testHasProjectAccessForManagers()
@@ -102,7 +102,7 @@ class UserHelperTest extends Base
$this->assertEquals(1, $project->create(array('name' => 'My project')));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertFalse($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertFalse($helper->hasProjectAccess('BoardViewController', 'show', 1));
}
public function testHasProjectAccessForUsers()
@@ -118,7 +118,7 @@ class UserHelperTest extends Base
$this->assertEquals(1, $project->create(array('name' => 'My project')));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertFalse($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertFalse($helper->hasProjectAccess('BoardViewController', 'show', 1));
}
public function testHasProjectAccessForAppManagerAndProjectManagers()
@@ -139,12 +139,12 @@ class UserHelperTest extends Base
$this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MANAGER));
$this->assertTrue($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertTrue($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertTrue($helper->hasProjectAccess('BoardViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('TaskViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('taskcreationcontroller', 'save', 1));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 2));
- $this->assertFalse($helper->hasProjectAccess('board', 'show', 2));
+ $this->assertFalse($helper->hasProjectAccess('BoardViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskCreationController', 'save', 2));
}
@@ -167,12 +167,12 @@ class UserHelperTest extends Base
$this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MANAGER));
$this->assertTrue($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertTrue($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertTrue($helper->hasProjectAccess('BoardViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('TaskViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('TaskCreationController', 'save', 1));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 2));
- $this->assertFalse($helper->hasProjectAccess('board', 'show', 2));
+ $this->assertFalse($helper->hasProjectAccess('BoardViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskCreationController', 'save', 2));
}
@@ -195,12 +195,12 @@ class UserHelperTest extends Base
$this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_MEMBER));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertTrue($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertTrue($helper->hasProjectAccess('BoardViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('TaskViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('TaskCreationController', 'save', 1));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 2));
- $this->assertFalse($helper->hasProjectAccess('board', 'show', 2));
+ $this->assertFalse($helper->hasProjectAccess('BoardViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskCreationController', 'save', 2));
}
@@ -223,12 +223,12 @@ class UserHelperTest extends Base
$this->assertTrue($projectUserRole->addUser(1, 2, Role::PROJECT_VIEWER));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 1));
- $this->assertTrue($helper->hasProjectAccess('board', 'show', 1));
+ $this->assertTrue($helper->hasProjectAccess('BoardViewController', 'show', 1));
$this->assertTrue($helper->hasProjectAccess('TaskViewController', 'show', 1));
$this->assertFalse($helper->hasProjectAccess('TaskCreationController', 'save', 1));
$this->assertFalse($helper->hasProjectAccess('ProjectEditController', 'edit', 2));
- $this->assertFalse($helper->hasProjectAccess('board', 'show', 2));
+ $this->assertFalse($helper->hasProjectAccess('BoardViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskViewController', 'show', 2));
$this->assertFalse($helper->hasProjectAccess('TaskCreationController', 'save', 2));
}