summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRafael de Camargo <rafaelcamargo@trt15.jus.br>2019-07-23 17:18:42 -0300
committerFrédéric Guillot <fred@kanboard.net>2019-07-23 15:41:13 -0700
commite488fdd154cd6c7f03d969a43c1a987c5345101b (patch)
tree902918aad69243b8092e41f439e86f633f55f883 /tests
parent21a3634fd131a0f1d6128c27ea6c582661a863f0 (diff)
Implements check for duplicate default columns
Diffstat (limited to 'tests')
-rw-r--r--tests/units/Model/BoardTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/units/Model/BoardTest.php b/tests/units/Model/BoardTest.php
index 9f540c63..4da06ffc 100644
--- a/tests/units/Model/BoardTest.php
+++ b/tests/units/Model/BoardTest.php
@@ -26,8 +26,8 @@ class BoardTest extends Base
$this->assertEquals('Work in progress', $columns[3]);
$this->assertEquals('Done', $columns[4]);
- // Custom columns: spaces should be trimed and no empty columns
- $input = ' column #1 , column #2, ';
+ // Custom columns: spaces should be trimed, no empty columns and no duplicates
+ $input = ' column #1 , column #2,column #1 ,column #3 , ';
$this->assertTrue($c->save(array('board_columns' => $input)));
$this->container['memoryCache']->flush();
@@ -37,8 +37,9 @@ class BoardTest extends Base
$columns = $columnModel->getList(2);
$this->assertTrue(is_array($columns));
- $this->assertEquals(2, count($columns));
+ $this->assertEquals(3, count($columns));
$this->assertEquals('column #1', $columns[5]);
$this->assertEquals('column #2', $columns[6]);
+ $this->assertEquals('column #3', $columns[7]);
}
}