aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests/blog_categories_spec.rb
blob: 2ba5f8225e0ee03fa0fdbda475391d4b61c3aa45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "spec_helper"

describe "blog categories" do
  login_refinery_user

  before(:each) do
    @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