Skip to content

Commit

Permalink
test for errors messages with HTML tags
Browse files Browse the repository at this point in the history
  • Loading branch information
edison committed Feb 16, 2012
1 parent 312796b commit 18b73dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/form_builder/error_test.rb
Expand Up @@ -73,6 +73,12 @@ def with_full_error_for(object, *args)
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
Expand Down

0 comments on commit 18b73dd

Please sign in to comment.