@@ -119,7 +119,7 class Repository < ActiveRecord::Base | |||
|
119 | 119 | elsif repository.is_default? |
|
120 | 120 | 1 |
|
121 | 121 | else |
|
122 | identifier <=> repository.identifier | |
|
122 | identifier.to_s <=> repository.identifier.to_s | |
|
123 | 123 | end |
|
124 | 124 | end |
|
125 | 125 |
@@ -318,4 +318,13 class RepositoryTest < ActiveSupport::TestCase | |||
|
318 | 318 | assert_equal "test_value_23", |
|
319 | 319 | repo.extra_info["test_2"]["test_23"] |
|
320 | 320 | end |
|
321 | ||
|
322 | def test_sort_should_not_raise_an_error_with_nil_identifiers | |
|
323 | r1 = Repository.new | |
|
324 | r2 = Repository.new | |
|
325 | ||
|
326 | assert_nothing_raised do | |
|
327 | [r1, r2].sort | |
|
328 | end | |
|
329 | end | |
|
321 | 330 | end |
General Comments 0
You need to be logged in to leave comments.
Login now