diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/boards.yml | 9 | ||||
-rw-r--r-- | test/unit/project_test.rb | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/test/fixtures/boards.yml b/test/fixtures/boards.yml index 0d6135875..cce3fdccc 100644 --- a/test/fixtures/boards.yml +++ b/test/fixtures/boards.yml @@ -17,3 +17,12 @@ boards_002: position: 2 last_message_id: messages_count: 0 +boards_003: + name: Discussion + project_id: 2 + topics_count: 0 + id: 3 + description: Discussion board + position: 1 + last_message_id: + messages_count: 0 diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index a08b5f856..082a850b8 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -488,6 +488,15 @@ class ProjectTest < ActiveSupport::TestCase end end + should "copy boards" do + assert @project.copy(@source_project) + + assert_equal 1, @project.boards.size + @project.boards.each do |board| + assert !@source_project.boards.include?(board) + end + end + should "change the new issues to use the copied issue categories" do issue = Issue.find(4) issue.update_attribute(:category_id, 3) |