Project priority is always rendered now

This commit is contained in:
Frederic Guillot
2017-02-26 14:34:03 -05:00
parent 27328255cd
commit 9bcf97a6c9
6 changed files with 16 additions and 27 deletions

View File

@@ -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()));
}
}