From 34a0216ca74b52472f8e717c78e927672c0dd4cf Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 25 Feb 2015 11:18:04 +0100 Subject: Add REST api to manage actions. --- tests/units/ActionTest.php | 8 ++++---- tests/units/ProjectDuplicationTest.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/units') diff --git a/tests/units/ActionTest.php b/tests/units/ActionTest.php index 429a181a..67957a26 100644 --- a/tests/units/ActionTest.php +++ b/tests/units/ActionTest.php @@ -27,7 +27,7 @@ class ActionTest extends Base $this->assertEquals(1, $project->create(array('name' => 'unit_test'))); // We create a new action - $this->assertTrue($action->create(array( + $this->assertEquals(1, $action->create(array( 'project_id' => 1, 'event_name' => Task::EVENT_MOVE_COLUMN, 'action_name' => 'TaskClose', @@ -78,14 +78,14 @@ class ActionTest extends Base $this->assertEquals(1, $c->create(array('name' => 'unit_test'))); // We create a new action - $this->assertTrue($a->create(array( + $this->assertEquals(1, $a->create(array( 'project_id' => 1, 'event_name' => GithubWebhook::EVENT_ISSUE_OPENED, 'action_name' => 'TaskCreation', 'params' => array() ))); - $this->assertTrue($a->create(array( + $this->assertEquals(2, $a->create(array( 'project_id' => 1, 'event_name' => GithubWebhook::EVENT_ISSUE_LABEL_CHANGE, 'action_name' => 'TaskAssignCategoryLabel', @@ -95,7 +95,7 @@ class ActionTest extends Base ) ))); - $this->assertTrue($a->create(array( + $this->assertEquals(3, $a->create(array( 'project_id' => 1, 'event_name' => Task::EVENT_CREATE_UPDATE, 'action_name' => 'TaskAssignColorCategory', diff --git a/tests/units/ProjectDuplicationTest.php b/tests/units/ProjectDuplicationTest.php index b35575aa..311ecc4a 100644 --- a/tests/units/ProjectDuplicationTest.php +++ b/tests/units/ProjectDuplicationTest.php @@ -156,7 +156,7 @@ class ProjectDuplicationTest extends Base $this->assertEquals(1, $p->create(array('name' => 'P1'))); - $this->assertTrue($a->create(array( + $this->assertEquals(1, $a->create(array( 'project_id' => 1, 'event_name' => Task::EVENT_MOVE_COLUMN, 'action_name' => 'TaskAssignCurrentUser', @@ -186,7 +186,7 @@ class ProjectDuplicationTest extends Base $this->assertEquals(2, $c->create(array('name' => 'C2', 'project_id' => 1))); $this->assertEquals(3, $c->create(array('name' => 'C3', 'project_id' => 1))); - $this->assertTrue($a->create(array( + $this->assertEquals(1, $a->create(array( 'project_id' => 1, 'event_name' => Task::EVENT_CREATE_UPDATE, 'action_name' => 'TaskAssignColorCategory', -- cgit v1.2.3