aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/refinery/blog/categories_spec.rb
blob: 1ffe29fac5c647ea8a29db66b3b1c753d55d4120 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require "spec_helper"

module Refinery
  module Blog
    describe Category, type: :feature do
      refinery_login_with_devise :authentication_devise_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)
            expect(page).to have_content("Refinery CMS blog post")
            expect(page).to have_content("Video Games")
          end
        end
      end
    end
  end
end