Implements check for duplicate default categories

This commit is contained in:
Rafael de Camargo
2019-07-23 17:19:12 -03:00
committed by Frédéric Guillot
parent e488fdd154
commit 7283bfaef6
2 changed files with 7 additions and 10 deletions

View File

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