diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-05-01 10:50:01 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-05-01 10:54:23 +0200 |
commit | d459b001b43d25053e7982e96eb8383538a6e358 (patch) | |
tree | 2a72ebc5e9439d79fe7654e13d20bae4ccb73333 /actionview/test | |
parent | 4d4950fae9e2a6970b5f1793aadc56a0b44e28a3 (diff) | |
parent | 58c3a0451260dfd693b47d561cf623cce1b38b99 (diff) | |
download | rails-d459b001b43d25053e7982e96eb8383538a6e358.tar.gz rails-d459b001b43d25053e7982e96eb8383538a6e358.tar.bz2 rails-d459b001b43d25053e7982e96eb8383538a6e358.zip |
Merge pull request #19844 from stevenspiel/link_to_if_block_helper_addition
Update url_helper.rb
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) |