aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authordougbradbury <doug@8thlight.com>2013-06-16 12:02:34 -0500
committerdougbradbury <doug@8thlight.com>2013-06-16 12:02:34 -0500
commitefc12fae1871142bd0cee733f8a7b1d02e519ff2 (patch)
treeacdee1a3755ebdd3917a385744f53845a87445fe /spec
parentccff7c06b5b1aa863c7021c3e253ccc866b37b1d (diff)
downloadrefinerycms-blog-efc12fae1871142bd0cee733f8a7b1d02e519ff2.tar.gz
refinerycms-blog-efc12fae1871142bd0cee733f8a7b1d02e519ff2.tar.bz2
refinerycms-blog-efc12fae1871142bd0cee733f8a7b1d02e519ff2.zip
limit rss feed for some services that have limits (like feedburner)
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/refinery/blog/posts_controller_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/controllers/refinery/blog/posts_controller_spec.rb b/spec/controllers/refinery/blog/posts_controller_spec.rb
new file mode 100644
index 0000000..ee948a5
--- /dev/null
+++ b/spec/controllers/refinery/blog/posts_controller_spec.rb
@@ -0,0 +1,24 @@
+require "spec_helper"
+
+module Refinery
+ module Blog
+ describe PostsController do
+ before do
+ FactoryGirl.create(:blog_post, :title => "blogpost_one")
+ FactoryGirl.create(:blog_post, :title => "blogpost_two")
+ FactoryGirl.create(:blog_post, :title => "blogpost_three")
+ end
+
+ it "should not limit rss feed" do
+ get :index, :format => :rss
+ assigns[:posts].size.should == 3
+ end
+
+ it "should limit rss feed" do
+ get :index, :format => :rss, :max_results => 2
+ assigns[:posts].count.should == 2
+ end
+ end
+ end
+end
+