Project priority is always rendered now
This commit is contained in:
@@ -11,7 +11,6 @@ class TaskHelperTest extends Base
|
||||
$helper = new TaskHelper($this->container);
|
||||
$this->assertNotEmpty($helper->renderPriorityField(array('priority_end' => '1', 'priority_start' => '5', 'priority_default' => '2'), array()));
|
||||
$this->assertNotEmpty($helper->renderPriorityField(array('priority_end' => '3', 'priority_start' => '1', 'priority_default' => '2'), array()));
|
||||
$this->assertEmpty($helper->renderPriorityField(array('priority_end' => '3', 'priority_start' => '3', 'priority_default' => '2'), array()));
|
||||
}
|
||||
|
||||
public function testFormatPriority()
|
||||
@@ -19,15 +18,13 @@ class TaskHelperTest extends Base
|
||||
$helper = new TaskHelper($this->container);
|
||||
|
||||
$this->assertEquals(
|
||||
'<span class="task-board-priority" title="Task priority">P2</span>',
|
||||
$helper->formatPriority(array('priority_end' => '3', 'priority_start' => '1', 'priority_default' => '2'), array('priority' => 2))
|
||||
'<span class="task-priority" title="Task priority">P2</span>',
|
||||
$helper->renderPriority(2)
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'<span class="task-board-priority" title="Task priority">-P6</span>',
|
||||
$helper->formatPriority(array('priority_end' => '3', 'priority_start' => '1', 'priority_default' => '2'), array('priority' => -6))
|
||||
'<span class="task-priority" title="Task priority">-P6</span>',
|
||||
$helper->renderPriority(-6)
|
||||
);
|
||||
|
||||
$this->assertEmpty($helper->formatPriority(array('priority_end' => '3', 'priority_start' => '3', 'priority_default' => '2'), array()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user