aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests/refinery/blog/categories_spec.rb
diff options
context:
space:
mode:
authorJamie Winsor <jamie@enmasse.com>2011-09-02 16:01:58 -0700
committerJamie Winsor <jamie@enmasse.com>2011-09-03 21:55:30 -0700
commit6212e60f9e4d144f9a136f6c82b33abd47ddb237 (patch)
tree3ba02acc7861ef51045f0196dff6bac9efda40d5 /spec/requests/refinery/blog/categories_spec.rb
parent80ca7c1bf99befac70803309e542a4db54f1f198 (diff)
downloadrefinerycms-blog-6212e60f9e4d144f9a136f6c82b33abd47ddb237.tar.gz
refinerycms-blog-6212e60f9e4d144f9a136f6c82b33abd47ddb237.tar.bz2
refinerycms-blog-6212e60f9e4d144f9a136f6c82b33abd47ddb237.zip
index action of blog post controller now caches and sweeps on changes
fix various views which were broken and untested with rails-3-1 upgrade add request spec tests for admin blog comments Factory is now FactoryGirl Fix multiple issues around listing unmoderated comments use cleaner definitions to set per_page willpaginate attribute on models update all paginate calls to use new arel representation reorganize filter sections to be located at top of controller modify uncategorized class method to activerecord scope and perform a left outer join instead of iterate through an array to find uncategorized posts move request specs into their proper places update guardfile to ensure that request specs get run when their respective controllers are modified Fix show action for AdminBlogComments and added test Fix redirection link after approving or rejecting a comment
Diffstat (limited to 'spec/requests/refinery/blog/categories_spec.rb')
-rw-r--r--spec/requests/refinery/blog/categories_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/requests/refinery/blog/categories_spec.rb b/spec/requests/refinery/blog/categories_spec.rb
new file mode 100644
index 0000000..48a3417
--- /dev/null
+++ b/spec/requests/refinery/blog/categories_spec.rb
@@ -0,0 +1,25 @@
+require "spec_helper"
+
+module Refinery
+ describe "BlogCategories" do
+ login_refinery_user
+
+ context "has one category and post" do
+ before(:each) do
+ @blog_post = FactoryGirl.create(:blog_post, :title => "Refinery CMS blog post")
+ @blog_category = FactoryGirl.create(:blog_category, :title => "Video Games")
+ @blog_post.categories << @blog_category
+ @blog_post.save!
+ end
+
+ describe "show categories blog posts" do
+ before(:each) { visit blog_category_path(@blog_category) }
+
+ it "should displays categories blog posts" do
+ page.should have_content("Refinery CMS blog post")
+ page.should have_content("Video Games")
+ end
+ end
+ end
+ end
+end