comparison test/unit/.svn/text-base/board_test.rb.svn-base @ 117:af80e5618e9b redmine-1.1

* Update to Redmine 1.1-stable branch (Redmine SVN rev 4707)
author Chris Cannam
date Thu, 13 Jan 2011 12:53:21 +0000
parents 513646585e45
children
comparison
equal deleted inserted replaced
39:150ceac17a8d 117:af80e5618e9b
1 require File.dirname(__FILE__) + '/../test_helper' 1 require File.expand_path('../../test_helper', __FILE__)
2 2
3 class BoardTest < ActiveSupport::TestCase 3 class BoardTest < ActiveSupport::TestCase
4 fixtures :projects, :boards, :messages 4 fixtures :projects, :boards, :messages, :attachments, :watchers
5 5
6 def setup 6 def setup
7 @project = Project.find(1) 7 @project = Project.find(1)
8 end 8 end
9 9
21 assert_equal @project.boards.size, board.position 21 assert_equal @project.boards.size, board.position
22 end 22 end
23 23
24 def test_destroy 24 def test_destroy
25 board = Board.find(1) 25 board = Board.find(1)
26 assert board.destroy 26 assert_difference 'Message.count', -6 do
27 # make sure that the associated messages are removed 27 assert_difference 'Attachment.count', -1 do
28 assert_difference 'Watcher.count', -1 do
29 assert board.destroy
30 end
31 end
32 end
28 assert_equal 0, Message.count(:conditions => {:board_id => 1}) 33 assert_equal 0, Message.count(:conditions => {:board_id => 1})
29 end 34 end
30 end 35 end