summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2015-02-25 11:18:04 +0100
committerFrancois Ferrand <thetypz@gmail.com>2015-02-25 11:35:31 +0100
commit34a0216ca74b52472f8e717c78e927672c0dd4cf (patch)
treed8d1ec5ceed03290767eea914007d05f1acc20bd /tests/units
parent11d1314fbe96c8f19d898cf18dc615a49a89fd0d (diff)
Add REST api to manage actions.
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/ActionTest.php8
-rw-r--r--tests/units/ProjectDuplicationTest.php4
2 files changed, 6 insertions, 6 deletions
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',