Sha256: b877d998d25dbe8b5c851b264879ad74d81c9a330948bc206174891eb8d05b11

Contents?: true

Size: 592 Bytes

Versions: 5

Compression:

Stored size: 592 Bytes

Contents

require 'spec_helper'

describe 'authorization' do
  context "without permission" do
    before :each do
      login
    end

    it 'redirects to the dashboard' do
      visit outpost_people_path
      current_path.should eq outpost.root_path
      page.should have_css ".alert-error"
      page.should have_content "You don't have permission"
    end
  end

  context 'with permission' do
    before :each do
      login
    end

    it 'goes to the page' do
      give_permission("Person")
      visit outpost_people_path
      current_path.should eq outpost_people_path
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 spec/features/authorization_spec.rb
outpost-cms-0.1.3 spec/features/authorization_spec.rb
outpost-cms-0.1.2 spec/features/authorization_spec.rb
outpost-cms-0.1.1 spec/features/authorization_spec.rb
outpost-cms-0.1.0 spec/features/authorization_spec.rb