aboutsummaryrefslogblamecommitdiffstats
path: root/spec/requests/blog_categories_spec.rb
blob: 33d330b8d4879fb91bfb100f65a3ea0594d51c49 (plain) (tree)
1
2
3
4
5



                             
                                  












                                                                        
   
require "spec_helper"

describe "blog categories" do
  before(:each) do
    Factory.create(:refinery_user)
    @blog_post = Factory(:blog_post, :title => "Refinery CMS blog post")
    @blog_category = Factory(:blog_category, :title => "Video Games")
    @blog_post.categories << @blog_category
    @blog_post.save!
  end

  context "has posts" do
    it "displays category's blog posts" do
      visit blog_category_path(@blog_category)
      page.should have_content("Refinery CMS blog post")
      page.should have_content("Video Games")
    end
  end
end