diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-04 16:57:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-04 16:57:15 +0000 |
commit | 9f396a6dfbb93231a085ee4111ff9f9f7b769fe9 (patch) | |
tree | 2473c954067517f23fdee022afccf0b444c10646 /test/unit/repository_test.rb | |
parent | ad8193dcdedadf145814734781755e826cef03ec (diff) | |
download | redmine-9f396a6dfbb93231a085ee4111ff9f9f7b769fe9.tar.gz redmine-9f396a6dfbb93231a085ee4111ff9f9f7b769fe9.zip |
Fixed undefined method `<=>' for nil:NilClass when sorting repositories with nil identifiers (#10827).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9619 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r-- | test/unit/repository_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 1fe246d8e..466babb38 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -318,4 +318,13 @@ class RepositoryTest < ActiveSupport::TestCase assert_equal "test_value_23", repo.extra_info["test_2"]["test_23"] end + + def test_sort_should_not_raise_an_error_with_nil_identifiers + r1 = Repository.new + r2 = Repository.new + + assert_nothing_raised do + [r1, r2].sort + end + end end |