Changed assertions to make them work with Rails2/3 ruby1.8/1.9 different behaviours.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9108 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-03-05 11:03:26 +00:00
parent 97ca65d1b2
commit aa9238912b
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ class CustomFieldTest < ActiveSupport::TestCase
def test_regexp_validation
field = IssueCustomField.new(:name => 'regexp', :field_format => 'text', :regexp => '[a-z0-9')
assert !field.save
assert_equal I18n.t('activerecord.errors.messages.invalid'),
field.errors[:regexp].to_s
assert_include I18n.t('activerecord.errors.messages.invalid'),
field.errors[:regexp]
field.regexp = '[a-z0-9]'
assert field.save
end