summaryrefslogtreecommitdiff
path: root/tests/units/Model/ProjectTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/Model/ProjectTest.php')
-rw-r--r--tests/units/Model/ProjectTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/units/Model/ProjectTest.php b/tests/units/Model/ProjectTest.php
index afd047b0..cadb42a6 100644
--- a/tests/units/Model/ProjectTest.php
+++ b/tests/units/Model/ProjectTest.php
@@ -305,4 +305,24 @@ class ProjectTest extends Base
$this->assertEquals('', $project['owner_username']);
$this->assertEquals(0, $project['owner_id']);
}
+
+ public function testPriority()
+ {
+ $projectModel = new Project($this->container);
+ $this->assertEquals(1, $projectModel->create(array('name' => 'My project 2')));
+
+ $project = $projectModel->getById(1);
+ $this->assertNotEmpty($project);
+ $this->assertEquals(0, $project['priority_default']);
+ $this->assertEquals(0, $project['priority_start']);
+ $this->assertEquals(3, $project['priority_end']);
+
+ $this->assertTrue($projectModel->update(array('id' => 1, 'priority_start' => 2, 'priority_end' => 5, 'priority_default' => 4)));
+
+ $project = $projectModel->getById(1);
+ $this->assertNotEmpty($project);
+ $this->assertEquals(4, $project['priority_default']);
+ $this->assertEquals(2, $project['priority_start']);
+ $this->assertEquals(5, $project['priority_end']);
+ }
}