summaryrefslogtreecommitdiff
path: root/tests/units/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-03 10:59:09 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-03 10:59:09 -0400
commitf87d3334e59cd2b57f97dedf2e60417fd1df9961 (patch)
tree46dc93afc7dfe0b3cbef0fb7620c3ab4de149508 /tests/units/Model
parentd975a3ac45df8515a86ab656d1a48d85c9f83c27 (diff)
Take default swimlane into consideration for SwimlaneModel::getFirstActiveSwimlane()
Diffstat (limited to 'tests/units/Model')
-rw-r--r--tests/units/Model/SwimlaneTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/units/Model/SwimlaneTest.php b/tests/units/Model/SwimlaneTest.php
index cf0be169..4541e07f 100644
--- a/tests/units/Model/SwimlaneTest.php
+++ b/tests/units/Model/SwimlaneTest.php
@@ -40,7 +40,17 @@ class SwimlaneTest extends Base
$this->assertEquals(2, $swimlaneModel->create(array('project_id' => 1, 'name' => 'Swimlane #2')));
$swimlane = $swimlaneModel->getFirstActiveSwimlane(1);
+ $this->assertEquals(0, $swimlane['id']);
+ $this->assertEquals('Default swimlane', $swimlane['name']);
+
+ $this->assertTrue($swimlaneModel->disableDefault(1));
+
+ $swimlane = $swimlaneModel->getFirstActiveSwimlane(1);
$this->assertEquals(2, $swimlane['id']);
+ $this->assertEquals('Swimlane #2', $swimlane['name']);
+
+ $this->assertTrue($swimlaneModel->disable(1, 2));
+ $this->assertNull($swimlaneModel->getFirstActiveSwimlane(1));
}
public function testGetList()