From 457e181ffb915e36e5da77317a6c824e10f5d5b3 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Mon, 1 Sep 2014 20:40:02 -0800 Subject: Improve task duplication --- tests/units/ActionTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/units/ActionTest.php') diff --git a/tests/units/ActionTest.php b/tests/units/ActionTest.php index b6528333..19226449 100644 --- a/tests/units/ActionTest.php +++ b/tests/units/ActionTest.php @@ -142,29 +142,29 @@ class ActionTest extends Base // Our task should have the color red and position=0 $t1 = $task->getById(1); - $this->assertEquals(0, $t1['position']); + $this->assertEquals(1, $t1['position']); $this->assertEquals(1, $t1['is_active']); $this->assertEquals('red', $t1['color_id']); $t1 = $task->getById(2); - $this->assertEquals(1, $t1['position']); + $this->assertEquals(2, $t1['position']); $this->assertEquals(1, $t1['is_active']); $this->assertEquals('yellow', $t1['color_id']); // We move our tasks - $task->movePosition(1, 1, 1); // task #1 to position 1 - $task->movePosition(2, 1, 0); // task #2 to position 0 + $task->movePosition(1, 1, 2); // task #1 to position 2 + $task->movePosition(2, 1, 1); // task #2 to position 1 $this->assertTrue($this->registry->event->isEventTriggered(Task::EVENT_MOVE_POSITION)); // Both tasks should be green $t1 = $task->getById(1); - $this->assertEquals(1, $t1['position']); + $this->assertEquals(2, $t1['position']); $this->assertEquals(1, $t1['is_active']); $this->assertEquals('green', $t1['color_id']); $t1 = $task->getById(2); - $this->assertEquals(0, $t1['position']); + $this->assertEquals(1, $t1['position']); $this->assertEquals(1, $t1['is_active']); $this->assertEquals('green', $t1['color_id']); } -- cgit v1.2.3