Sha256: 4e108ab16cdaeefc1337353c92f4d31a91b939a8467b8280928daf7861f56c06
Contents?: true
Size: 824 Bytes
Versions: 62
Compression:
Stored size: 824 Bytes
Contents
require 'test_helper' module Workarea class ConditionalUrlHelperTest < ViewTest def test_link_to_if_with_block result = link_to_if_with_block(true, 'www.example.com', {}) do "Block body" end assert_equal("<a href=\"www.example.com\">Block body</a>", result) result = link_to_if_with_block(false, 'www.example.com', {}) do "Block body" end assert_equal("Block body", result) end def test_link_to_unless_with_block result = link_to_unless_with_block(true, 'www.example.com', {}) do "Block body" end assert_equal("Block body", result) result = link_to_unless_with_block(false, 'www.example.com', {}) do "Block body" end assert_equal("<a href=\"www.example.com\">Block body</a>", result) end end end
Version data entries
62 entries across 62 versions & 1 rubygems