Rails3: test: replace deprecated Errors#on to Errors#[] and join with to_s at test/unit/repository_test.rb
On Rails2, Errors#[] returns single error if one error raises. But, on Rails3, Errors#[] always returns the array. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8135 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
caf9edf2c1
commit
66b49c634d
|
@ -68,7 +68,7 @@ class RepositoryTest < ActiveSupport::TestCase
|
||||||
:project => Project.find(3), :url => "svn://localhost")
|
:project => Project.find(3), :url => "svn://localhost")
|
||||||
assert !repository.save
|
assert !repository.save
|
||||||
assert_equal I18n.translate('activerecord.errors.messages.invalid'),
|
assert_equal I18n.translate('activerecord.errors.messages.invalid'),
|
||||||
repository.errors.on(:type)
|
repository.errors[:type].to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue