aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests/refinery/blog/admin/categories_spec.rb
blob: fd18cc088b52f84525940314ee6ff946ebacb81f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

describe "Categories admin" do
  login_refinery_user

  let(:title) { "lol" }

  it "can create categories" do
    visit refinery.admin_root_path

    within("nav#menu") { click_link "Blog" }
    within("nav.multilist") { click_link "Create new category" }

    fill_in "Title", :with => title
    click_button "Save"

    category = Refinery::Blog::Category.first
    category.title.should eq(title)
  end
end