diff options
-rw-r--r-- | app/Model/TagDuplicationModel.php | 2 | ||||
-rw-r--r-- | tests/units/Model/TagDuplicationModelTest.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/Model/TagDuplicationModel.php b/app/Model/TagDuplicationModel.php index fb0d8170..ac54f5d0 100644 --- a/app/Model/TagDuplicationModel.php +++ b/app/Model/TagDuplicationModel.php @@ -26,7 +26,7 @@ class TagDuplicationModel extends Base $results = array(); foreach ($tags as $tag) { - $results[] = $this->tagModel->create($dst_project_id, $tag['name']); + $results[] = $this->tagModel->create($dst_project_id, $tag['name'], $tag['color_id']); } return ! in_array(false, $results, true); diff --git a/tests/units/Model/TagDuplicationModelTest.php b/tests/units/Model/TagDuplicationModelTest.php index 0c95c0fd..0422ba17 100644 --- a/tests/units/Model/TagDuplicationModelTest.php +++ b/tests/units/Model/TagDuplicationModelTest.php @@ -19,13 +19,15 @@ class TagDuplicationModelTest extends Base $this->assertEquals(1, $tagModel->create(0, 'Tag 1')); $this->assertEquals(2, $tagModel->create(1, 'Tag 2')); - $this->assertEquals(3, $tagModel->create(1, 'Tag 3')); + $this->assertEquals(3, $tagModel->create(1, 'Tag 3', 'green')); $this->assertTrue($tagDuplicationModel->duplicate(1, 2)); $tags = $tagModel->getAllByProject(2); $this->assertCount(2, $tags); $this->assertEquals('Tag 2', $tags[0]['name']); + $this->assertEquals('', $tags[0]['color_id']); $this->assertEquals('Tag 3', $tags[1]['name']); + $this->assertEquals('green', $tags[1]['color_id']); } } |