Fixes strange random test failures with Mysql.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3724 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-05-01 10:09:20 +00:00
parent 6a8dc735d3
commit edeb84a070
1 changed files with 4 additions and 0 deletions

View File

@ -1111,6 +1111,10 @@ class IssuesControllerTest < ActionController::TestCase
end
should "allow changing the issue's attributes" do
# Fixes random test failure with Mysql
# where Issue.all(:limit => 2, :order => 'id desc', :conditions => {:project_id => 2}) doesn't return the expected results
Issue.delete_all("project_id=2")
@request.session[:user_id] = 2
assert_difference 'Issue.count', 2 do
assert_no_difference 'Project.find(1).issues.count' do