summaryrefslogtreecommitdiff
path: root/tests/units/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-02-04 21:38:53 -0500
committerFrederic Guillot <fred@kanboard.net>2016-02-04 21:38:53 -0500
commit0f2b46dd6a9a1dc17768de2c415f382df95142e8 (patch)
tree55191fce45c7c06b7d2b45834ea4151745c3db77 /tests/units/Model
parent346151e103431e8de12520b26daae10676b8faf5 (diff)
Do not refresh the whole page when changing subtask status (work in progress)
Diffstat (limited to 'tests/units/Model')
-rw-r--r--tests/units/Model/SubtaskTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/units/Model/SubtaskTest.php b/tests/units/Model/SubtaskTest.php
index 9be2dff4..34599004 100644
--- a/tests/units/Model/SubtaskTest.php
+++ b/tests/units/Model/SubtaskTest.php
@@ -159,7 +159,7 @@ class SubtaskTest extends Base
$this->assertEquals(0, $subtask['user_id']);
$this->assertEquals(1, $subtask['task_id']);
- $this->assertTrue($s->toggleStatus(1));
+ $this->assertEquals(Subtask::STATUS_INPROGRESS, $s->toggleStatus(1));
$subtask = $s->getById(1);
$this->assertNotEmpty($subtask);
@@ -167,7 +167,7 @@ class SubtaskTest extends Base
$this->assertEquals(0, $subtask['user_id']);
$this->assertEquals(1, $subtask['task_id']);
- $this->assertTrue($s->toggleStatus(1));
+ $this->assertEquals(Subtask::STATUS_DONE, $s->toggleStatus(1));
$subtask = $s->getById(1);
$this->assertNotEmpty($subtask);
@@ -175,7 +175,7 @@ class SubtaskTest extends Base
$this->assertEquals(0, $subtask['user_id']);
$this->assertEquals(1, $subtask['task_id']);
- $this->assertTrue($s->toggleStatus(1));
+ $this->assertEquals(Subtask::STATUS_TODO, $s->toggleStatus(1));
$subtask = $s->getById(1);
$this->assertNotEmpty($subtask);
@@ -205,7 +205,7 @@ class SubtaskTest extends Base
// Set the current logged user
$this->container['sessionStorage']->user = array('id' => 1);
- $this->assertTrue($s->toggleStatus(1));
+ $this->assertEquals(Subtask::STATUS_INPROGRESS, $s->toggleStatus(1));
$subtask = $s->getById(1);
$this->assertNotEmpty($subtask);
@@ -213,7 +213,7 @@ class SubtaskTest extends Base
$this->assertEquals(1, $subtask['user_id']);
$this->assertEquals(1, $subtask['task_id']);
- $this->assertTrue($s->toggleStatus(1));
+ $this->assertEquals(Subtask::STATUS_DONE, $s->toggleStatus(1));
$subtask = $s->getById(1);
$this->assertNotEmpty($subtask);
@@ -221,7 +221,7 @@ class SubtaskTest extends Base
$this->assertEquals(1, $subtask['user_id']);
$this->assertEquals(1, $subtask['task_id']);
- $this->assertTrue($s->toggleStatus(1));
+ $this->assertEquals(Subtask::STATUS_TODO, $s->toggleStatus(1));
$subtask = $s->getById(1);
$this->assertNotEmpty($subtask);