aboutsummaryrefslogblamecommitdiffstats
path: root/spec/features/refinery/blog/categories_spec.rb
blob: efcf3886ae2fccb25a69e9eb4aab1bba9fd4d8df (plain) (tree)
1
2
3
4
5
6
7
8


                     
                                              
                                      
 
                                          
               







                                                                            
         
 
                                              
                                                     
                                                      






                                                            
require "spec_helper"

module Refinery
  describe "BlogCategories", type: :feature do
    refinery_login_with :refinery_user

    context "has one category and post" do
      before do
        post = Globalize.with_locale(:en) do
          FactoryGirl.create(:blog_post, :title => "Refinery CMS blog post")
        end
        @category = Globalize.with_locale(:en) do
          FactoryGirl.create(:blog_category, :title => "Video Games")
        end
        post.categories << @category
        post.save!
      end

      describe "show categories blog posts" do
        it "should displays categories blog posts" do
          visit refinery.blog_category_path(@category)
          page.should have_content("Refinery CMS blog post")
          page.should have_content("Video Games")
        end
      end
    end
  end
end