Mercurial > hg > soundsoftware-site
comparison test/unit/board_test.rb @ 1464:261b3d9a4903 redmine-2.4
Update to Redmine 2.4 branch rev 12663
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2014 14:37:42 +0000 |
parents | 433d4f72a19b |
children | e248c7af89ec |
comparison
equal
deleted
inserted
replaced
1296:038ba2d95de8 | 1464:261b3d9a4903 |
---|---|
1 # encoding: utf-8 | 1 # encoding: utf-8 |
2 # | 2 # |
3 # Redmine - project management software | 3 # Redmine - project management software |
4 # Copyright (C) 2006-2012 Jean-Philippe Lang | 4 # Copyright (C) 2006-2013 Jean-Philippe Lang |
5 # | 5 # |
6 # This program is free software; you can redistribute it and/or | 6 # This program is free software; you can redistribute it and/or |
7 # modify it under the terms of the GNU General Public License | 7 # modify it under the terms of the GNU General Public License |
8 # as published by the Free Software Foundation; either version 2 | 8 # as published by the Free Software Foundation; either version 2 |
9 # of the License, or (at your option) any later version. | 9 # of the License, or (at your option) any later version. |
98 assert_difference 'Watcher.count', -1 do | 98 assert_difference 'Watcher.count', -1 do |
99 assert board.destroy | 99 assert board.destroy |
100 end | 100 end |
101 end | 101 end |
102 end | 102 end |
103 assert_equal 0, Message.count(:conditions => {:board_id => 1}) | 103 assert_equal 0, Message.where(:board_id => 1).count |
104 end | 104 end |
105 | 105 |
106 def test_destroy_should_nullify_children | 106 def test_destroy_should_nullify_children |
107 parent = Board.generate!(:project => @project) | 107 parent = Board.generate!(:project => @project) |
108 child = Board.generate!(:project => @project, :parent => parent) | 108 child = Board.generate!(:project => @project, :parent => parent) |