diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-01-16 16:35:13 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-01-16 16:35:13 -0200 |
commit | fb82da305c971c4647007f85e2523e0772c43eae (patch) | |
tree | e44630dd7670d4dbe4c76143a19719a598115ffc /actionview/test | |
parent | b74c3565cb08d6b011915c7c04c2f01fa1b78bf0 (diff) | |
parent | 6ba4c6d497a71ee4b335898a6021124462b93724 (diff) | |
download | rails-fb82da305c971c4647007f85e2523e0772c43eae.tar.gz rails-fb82da305c971c4647007f85e2523e0772c43eae.tar.bz2 rails-fb82da305c971c4647007f85e2523e0772c43eae.zip |
Merge pull request #18437 from eldano/feed_entry_no_link_option
Use option url: false to allow entries without a link tag
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/atom_feed_helper_test.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/actionview/test/template/atom_feed_helper_test.rb b/actionview/test/template/atom_feed_helper_test.rb index 68b44c4f0d..9e06621c83 100644 --- a/actionview/test/template/atom_feed_helper_test.rb +++ b/actionview/test/template/atom_feed_helper_test.rb @@ -62,6 +62,23 @@ class ScrollsController < ActionController::Base end end EOT + FEEDS["entry_url_false_option"] = <<-EOT + atom_feed do |feed| + feed.title("My great blog!") + feed.updated((@scrolls.first.created_at)) + + @scrolls.each do |scroll| + feed.entry(scroll, :url => false) do |entry| + entry.title(scroll.title) + entry.content(scroll.body, :type => 'html') + + entry.author do |author| + author.name("DHH") + end + end + end + end + EOT FEEDS["xml_block"] = <<-EOT atom_feed do |feed| feed.title("My great blog!") @@ -337,6 +354,13 @@ class AtomFeedTest < ActionController::TestCase end end + def test_feed_entry_url_false_option_adds_no_link + with_restful_routing(:scrolls) do + get :index, :id => 'entry_url_false_option' + assert_select "entry link", false + end + end + private def with_restful_routing(resources) with_routing do |set| |