summaryrefslogtreecommitdiff
path: root/test/functional/rss_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/rss_controller_test.rb')
-rw-r--r--test/functional/rss_controller_test.rb32
1 files changed, 29 insertions, 3 deletions
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 @@
1require 'test_helper' 1require 'test_helper'
2 2
3class RssControllerTest < ActionController::TestCase 3class RssControllerTest < ActionController::TestCase
4 # Replace this with your real tests. 4
5 test "the truth" do 5 def setup
6 assert true 6 @user = User.create :login => 'rsstest', :email => 'rsstest@example.com',
7 :password => 'foobar', :password_confirmation => 'foobar'
8 @node = Node.root.children.create! :slug => 'rss_test_node'
9 draft = @node.find_or_create_draft @user
10 draft.title = "RSS Update Article"
11 draft.tag_list = "update"
12 draft.save
13 @node.publish_draft!
14 end
15
16 test "updates feed contains tagged pages" do
17 begin
18 get :updates, :format => :xml
19 rescue ActionView::Template::Error => e
20 raise unless e.message =~ /superclass mismatch/
21 end
22 assert assigns(:items).any?, "Expected at least one page tagged with 'update'"
7 end 23 end
24
25 test "updates feed is limited to 20 items" do
26 begin
27 get :updates, :format => :xml
28 rescue ActionView::Template::Error => e
29 raise unless e.message =~ /superclass mismatch/
30 end
31 assert assigns(:items).length <= 20
32 end
33
8end 34end