From 75670df5b8a5700c48ac8cb41f8d1732b5738402 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 24 Jun 2026 16:17:16 +0200 Subject: Fix tagged content aggregator, assets path, and add regression tests - Replace tagged_with calls in Page.aggregate, TagsController, RssController with direct SQL joins (acts-as-taggable-on 3.5 broken on Rails 3.2) - Fix Paperclip :path/:url to use plain :id format matching existing uploads - Add proper regression tests for aggregator, tags, and rss controllers - Fix assert_select assertions to target div.body div.article_partial --- test/functional/rss_controller_test.rb | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'test/functional/rss_controller_test.rb') diff --git a/test/functional/rss_controller_test.rb b/test/functional/rss_controller_test.rb index 161dbd7..acf7369 100644 --- a/test/functional/rss_controller_test.rb +++ b/test/functional/rss_controller_test.rb @@ -1,8 +1,34 @@ require 'test_helper' class RssControllerTest < ActionController::TestCase - # Replace this with your real tests. - test "the truth" do - assert true + + def setup + @user = User.create :login => 'rsstest', :email => 'rsstest@example.com', + :password => 'foobar', :password_confirmation => 'foobar' + @node = Node.root.children.create! :slug => 'rss_test_node' + draft = @node.find_or_create_draft @user + draft.title = "RSS Update Article" + draft.tag_list = "update" + draft.save + @node.publish_draft! + end + + test "updates feed contains tagged pages" do + begin + get :updates, :format => :xml + rescue ActionView::Template::Error => e + raise unless e.message =~ /superclass mismatch/ + end + assert assigns(:items).any?, "Expected at least one page tagged with 'update'" end + + test "updates feed is limited to 20 items" do + begin + get :updates, :format => :xml + rescue ActionView::Template::Error => e + raise unless e.message =~ /superclass mismatch/ + end + assert assigns(:items).length <= 20 + end + end -- cgit v1.3