diff options
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/url_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/test/template/url_helper_test.rb b/actionview/test/template/url_helper_test.rb index ef4df0407a..1a4d4f6a10 100644 --- a/actionview/test/template/url_helper_test.rb +++ b/actionview/test/template/url_helper_test.rb @@ -379,6 +379,11 @@ class UrlHelperTest < ActiveSupport::TestCase assert_dom_equal %{<a href="/">Listing</a>}, link_to_if(true, "Listing", url_hash) end + def test_link_to_if_with_block + assert_equal "Block Showing", link_to_if(false, url_hash) { "Block Showing" } + assert_dom_equal %{<a href="/">Block Listing</a>}, link_to_if(true, url_hash) { "Block Listing" } + end + def request_for_url(url, opts = {}) env = Rack::MockRequest.env_for("http://www.example.com#{url}", opts) ActionDispatch::Request.new(env) |