summaryrefslogtreecommitdiff
path: root/tests/units/Model/SwimlaneTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/Model/SwimlaneTest.php')
-rw-r--r--tests/units/Model/SwimlaneTest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/units/Model/SwimlaneTest.php b/tests/units/Model/SwimlaneTest.php
index 2594b17a..cf0be169 100644
--- a/tests/units/Model/SwimlaneTest.php
+++ b/tests/units/Model/SwimlaneTest.php
@@ -30,6 +30,19 @@ class SwimlaneTest extends Base
$this->assertEquals('', $s->getNameById(23));
}
+ public function testGetFirstActiveSwimlane()
+ {
+ $projectModel = new ProjectModel($this->container);
+ $swimlaneModel = new SwimlaneModel($this->container);
+
+ $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest')));
+ $this->assertEquals(1, $swimlaneModel->create(array('project_id' => 1, 'name' => 'Swimlane #1', 'is_active' => 0)));
+ $this->assertEquals(2, $swimlaneModel->create(array('project_id' => 1, 'name' => 'Swimlane #2')));
+
+ $swimlane = $swimlaneModel->getFirstActiveSwimlane(1);
+ $this->assertEquals(2, $swimlane['id']);
+ }
+
public function testGetList()
{
$p = new ProjectModel($this->container);