test for errors messages with HTML tags

This commit is contained in:
Edison 2012-02-16 15:07:03 -02:00
parent 312796b1ee
commit 18b73ddba4
1 changed files with 6 additions and 0 deletions

View File

@ -73,6 +73,12 @@ class ErrorTest < ActionView::TestCase
assert_no_select 'p.error[error_method]'
end
test 'error should generate an error message with raw HTML tags' do
with_error_for @user, :name, :error_prefix => '<b>Name</b>'
assert_select 'span.error', "Name can't be blank"
assert_select 'span.error b', "Name"
end
# FULL ERRORS
test 'full error should generate an full error tag for the attribute' do