2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2017-06-30 09:18:17 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
feature 'Has correct abilities' do
|
|
|
|
|
|
2024-06-07 16:31:23 +02:00
|
|
|
let(:conference) { create(:full_conference) } # user is cfp
|
2017-06-30 09:18:17 +05:30
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
|
|
context 'when user has no role' do
|
|
|
|
|
before do
|
|
|
|
|
sign_in user
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
scenario 'for administration views' do
|
|
|
|
|
visit admin_conference_path(conference.short_title)
|
2025-08-06 13:04:53 +02:00
|
|
|
|
2017-06-30 09:18:17 +05:30
|
|
|
expect(current_path).to eq root_path
|
2025-08-06 13:04:53 +02:00
|
|
|
within('#flash') { expect(page).to have_text('You are not authorized to access this page.') }
|
2017-06-30 09:18:17 +05:30
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|