From 97e04dcdf139e51e3bdd6c77334b992083914dad Mon Sep 17 00:00:00 2001 From: Gregor Schmidt Date: Fri, 18 Nov 2011 14:01:26 +0100 Subject: [PATCH] The test expects a well defined order of the issues --- spec/models/version_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/version_spec.rb b/spec/models/version_spec.rb index e05971961f..d73b0c78c3 100644 --- a/spec/models/version_spec.rb +++ b/spec/models/version_spec.rb @@ -69,7 +69,7 @@ describe Version do version.rebuild_positions(project) - issues = version.fixed_issues.find(:all, :conditions => {:project_id => project}, :order => 'position ASC, id ASC') + issues = version.fixed_issues.find(:all, :conditions => {:project_id => project}, :order => 'COALESCE(position, 0) ASC, id ASC') issues.map(&:position).should == [nil, nil, 1, 2, 3, 4, 5] issues.map(&:subject).should == [t3, o9, e1, s2, s5, s3, s4].map(&:subject)