Mercurial > hg > soundsoftware-site
comparison test/unit/board_test.rb @ 1526:404aa68d4227
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 11 Sep 2014 12:46:20 +0100 |
parents | e248c7af89ec |
children |
comparison
equal
deleted
inserted
replaced
1493:a5f2bdf3b486 | 1526:404aa68d4227 |
---|---|
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-2014 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) |