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


                              

                                    


                               
                                  










                                                                
require 'spec_helper'

describe "Categories admin" do
  refinery_login_with :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