summaryrefslogtreecommitdiff
path: root/tests/units
diff options
context:
space:
mode:
authorRafael de Camargo <rafaelcamargo@trt15.jus.br>2019-07-23 17:19:12 -0300
committerFrédéric Guillot <fred@kanboard.net>2019-07-23 15:41:13 -0700
commit7283bfaef6aeeb62aed2478e201f28d7361633fd (patch)
tree4f5767e63c3a6724ae7b0d0c79c7a4b3768a17b9 /tests/units
parente488fdd154cd6c7f03d969a43c1a987c5345101b (diff)
Implements check for duplicate default categories
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/Model/CategoryModelTest.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/units/Model/CategoryModelTest.php b/tests/units/Model/CategoryModelTest.php
index 6147b3a5..9916341b 100644
--- a/tests/units/Model/CategoryModelTest.php
+++ b/tests/units/Model/CategoryModelTest.php
@@ -156,7 +156,8 @@ class CategoryModelTest extends Base
$categoryModel = new CategoryModel($this->container);
$configModel = new ConfigModel($this->container);
- $this->assertTrue($configModel->save(array('project_categories' => 'C1, C2, C3')));
+ // Custom categories: spaces should be trimed, no empty and no duplicates
+ $this->assertTrue($configModel->save(array('project_categories' => 'C1, C2, C2 , C3, C1, ')));
$this->assertEquals(1, $projectModel->create(array('name' => 'Project #1')));
$this->assertTrue($categoryModel->createDefaultCategories(1));