summaryrefslogtreecommitdiff
path: root/tests/units/Integration/GithubWebhookTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-05 20:31:27 -0500
commite9fedf3e5cd63aea4da7a71f6647ee427c62fa49 (patch)
treeabc2de5aebace4a2d7c94805552264dab6b10bc7 /tests/units/Integration/GithubWebhookTest.php
parent346b8312e5ac877ce3192c2db3a26b500018bbb5 (diff)
Rewrite of the authentication and authorization system
Diffstat (limited to 'tests/units/Integration/GithubWebhookTest.php')
-rw-r--r--tests/units/Integration/GithubWebhookTest.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/units/Integration/GithubWebhookTest.php b/tests/units/Integration/GithubWebhookTest.php
index d64e783e..f00e5dde 100644
--- a/tests/units/Integration/GithubWebhookTest.php
+++ b/tests/units/Integration/GithubWebhookTest.php
@@ -6,8 +6,9 @@ use Kanboard\Integration\GithubWebhook;
use Kanboard\Model\TaskCreation;
use Kanboard\Model\TaskFinder;
use Kanboard\Model\Project;
-use Kanboard\Model\ProjectPermission;
+use Kanboard\Model\ProjectUserRole;
use Kanboard\Model\User;
+use Kanboard\Core\Security\Role;
class GithubWebhookTest extends Base
{
@@ -40,8 +41,8 @@ class GithubWebhookTest extends Base
$u = new User($this->container);
$this->assertEquals(2, $u->create(array('username' => 'fguillot')));
- $pp = new ProjectPermission($this->container);
- $this->assertTrue($pp->addMember(1, 2));
+ $pp = new ProjectUserRole($this->container);
+ $this->assertTrue($pp->addUser(1, 2, Role::PROJECT_MEMBER));
$g = new GithubWebhook($this->container);
$g->setProjectId(1);
@@ -111,8 +112,8 @@ class GithubWebhookTest extends Base
$u = new User($this->container);
$this->assertEquals(2, $u->create(array('username' => 'fguillot')));
- $pp = new ProjectPermission($this->container);
- $this->assertTrue($pp->addMember(1, 2));
+ $pp = new ProjectUserRole($this->container);
+ $this->assertTrue($pp->addUser(1, 2, ROLE::PROJECT_MANAGER));
$g = new GithubWebhook($this->container);
$g->setProjectId(1);
@@ -323,8 +324,8 @@ class GithubWebhookTest extends Base
$u = new User($this->container);
$this->assertEquals(2, $u->create(array('username' => 'fguillot')));
- $pp = new ProjectPermission($this->container);
- $this->assertTrue($pp->addMember(1, 2));
+ $pp = new ProjectUserRole($this->container);
+ $this->assertTrue($pp->addUser(1, 2, Role::PROJECT_MEMBER));
$g = new GithubWebhook($this->container);
$g->setProjectId(1);