assert_template 'new'
issue = assigns(:issue)
assert_not_nil issue
- assert_error_tag :content => /Database can't be blank/
+ assert_error_tag :content => /Database #{ESCAPED_CANT} be blank/
end
def test_create_should_validate_required_fields
assert_template 'new'
end
- assert_error_tag :content => /Due date can't be blank/i
- assert_error_tag :content => /Bar can't be blank/i
+ assert_error_tag :content => /Due date #{ESCAPED_CANT} be blank/i
+ assert_error_tag :content => /Bar #{ESCAPED_CANT} be blank/i
end
def test_create_should_ignore_readonly_fields
assert_response :success
assert_template 'edit'
- assert_error_tag :descendant => {:content => /Activity can't be blank/}
+ assert_error_tag :descendant => {:content => /Activity #{ESCAPED_CANT} be blank/}
assert_select 'textarea[name=?]', 'issue[notes]', :text => notes
assert_select 'input[name=?][value=?]', 'time_entry[hours]', '2z'
end
assert_response :success
assert_template 'edit'
- assert_error_tag :descendant => {:content => /Activity can't be blank/}
- assert_error_tag :descendant => {:content => /Hours can't be blank/}
+ assert_error_tag :descendant => {:content => /Activity #{ESCAPED_CANT} be blank/}
+ assert_error_tag :descendant => {:content => /Hours #{ESCAPED_CANT} be blank/}
assert_select 'textarea[name=?]', 'issue[notes]', :text => notes
assert_select 'input[name=?][value=?]', 'time_entry[comments]', 'this is my comment'
end