summaryrefslogtreecommitdiff
path: root/tests/units/Model/SwimlaneTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-06-01 21:28:24 -0400
committerFrederic Guillot <fred@kanboard.net>2016-06-01 21:28:24 -0400
commitc50255813b1f2de3709b17492d32c9e4ce280236 (patch)
treebac9a31956c558526e831c05c74ef03c676e453b /tests/units/Model/SwimlaneTest.php
parentca87b1b60f9b4b49c80920e5009d6fbe4e3fb514 (diff)
Added mail helper
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);