Commit f86446fe934c9fc34691198c5705a7337b10d5dc
1 parent
c6849e53
Exists in
staging
and in
42 other branches
rails3: Fix ValidationInfoTest unit test. Change deprecated call for method inva…
…lid?(attr) in ActiveModel::Errors class by [:attr].any?
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
test/unit/validation_info_test.rb
... | ... | @@ -5,10 +5,10 @@ class ValidationInfoTest < ActiveSupport::TestCase |
5 | 5 | should 'validate the presence of validation methodology description' do |
6 | 6 | info = ValidationInfo.new |
7 | 7 | info.valid? |
8 | - assert info.errors.invalid?(:validation_methodology) | |
8 | + assert info.errors[:validation_methodology].any? | |
9 | 9 | info.validation_methodology = 'lalala' |
10 | 10 | info.valid? |
11 | - assert !info.errors.invalid?(:validation_methodology) | |
11 | + assert !info.errors[:validation_methodology].any? | |
12 | 12 | end |
13 | 13 | |
14 | 14 | should 'refer to and validate the presence of an organization' do | ... | ... |