mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Added test for link_to_unless to make sure the result consistency.
This commit is contained in:
parent
a84c40e19a
commit
c91e1cca43
1 changed files with 5 additions and 0 deletions
|
@ -348,6 +348,11 @@ class UrlHelperTest < ActiveSupport::TestCase
|
|||
link_to_unless(true, "Showing", url_hash) {
|
||||
"test"
|
||||
}
|
||||
|
||||
assert_equal %{<b>Showing</b>}, link_to_unless(true, "<b>Showing</b>", url_hash)
|
||||
assert_equal %{<a href="/"><b>Showing</b></a>}, link_to_unless(false, "<b>Showing</b>", url_hash)
|
||||
assert_equal %{<b>Showing</b>}, link_to_unless(true, "<b>Showing</b>".html_safe, url_hash)
|
||||
assert_equal %{<a href="/"><b>Showing</b></a>}, link_to_unless(false, "<b>Showing</b>".html_safe, url_hash)
|
||||
end
|
||||
|
||||
def test_link_to_if
|
||||
|
|
Loading…
Reference in a new issue