summaryrefslogtreecommitdiffstats
path: root/test/unit/version_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-02 16:47:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-02 16:47:53 +0000
commit2275f46138758c2cf10511901a59c555e14a046f (patch)
tree91e49181fc9ce34482d1b7e845ee56f999701959 /test/unit/version_test.rb
parent34cdac166949e5b88b3df36e5125fe4688339d18 (diff)
downloadredmine-2275f46138758c2cf10511901a59c555e14a046f.tar.gz
redmine-2275f46138758c2cf10511901a59c555e14a046f.zip
Makes Version#<=> consistent with SQL sort.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10152 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/version_test.rb')
-rw-r--r--test/unit/version_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/unit/version_test.rb b/test/unit/version_test.rb
index 8199e2542..d80c3d10f 100644
--- a/test/unit/version_test.rb
+++ b/test/unit/version_test.rb
@@ -115,6 +115,7 @@ class VersionTest < ActiveSupport::TestCase
v1 = Version.create!(:project_id => 1, :name => 'v3', :effective_date => '2012-08-02')
v5 = Version.create!(:project_id => 1, :name => 'v5', :effective_date => '2012-07-02')
+ assert_equal [v5, v3, v1, v2, v4], [v1, v2, v3, v4, v5].sort
assert_equal [v5, v3, v1, v2, v4], Version.sorted.all
end