summaryrefslogtreecommitdiffstats
path: root/test/unit/board_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/board_test.rb')
-rw-r--r--test/unit/board_test.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/unit/board_test.rb b/test/unit/board_test.rb
index 569c4620a..d3073ec82 100644
--- a/test/unit/board_test.rb
+++ b/test/unit/board_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class BoardTest < ActiveSupport::TestCase
- fixtures :projects, :boards, :messages
+ fixtures :projects, :boards, :messages, :attachments, :watchers
def setup
@project = Project.find(1)
@@ -23,8 +23,13 @@ class BoardTest < ActiveSupport::TestCase
def test_destroy
board = Board.find(1)
- assert board.destroy
- # make sure that the associated messages are removed
+ assert_difference 'Message.count', -6 do
+ assert_difference 'Attachment.count', -1 do
+ assert_difference 'Watcher.count', -1 do
+ assert board.destroy
+ end
+ end
+ end
assert_equal 0, Message.count(:conditions => {:board_id => 1})
end
end