fix from rebase
Conflicts: app/views/layouts/_admin_sidebar.html.haml
This commit is contained in:
parent
f7ef401be7
commit
f5081813d9
6 changed files with 29 additions and 53 deletions
|
|
@ -19,8 +19,8 @@ feature 'Has correct abilities' do
|
|||
sign_in user
|
||||
visit admin_conference_path(conference1.short_title)
|
||||
|
||||
expect(page.has_content?('Settings')).to be true
|
||||
expect(page.has_content?('Manage')).to be true
|
||||
expect(page.has_content?('Basics')).to be true
|
||||
expect(page.has_content?('Dashboard')).to be true
|
||||
expect(page.has_content?('Registrations')).to be true
|
||||
expect(page.has_content?('Events')).to be true
|
||||
expect(page.has_content?('Schedule')).to be true
|
||||
|
|
@ -81,8 +81,8 @@ feature 'Has correct abilities' do
|
|||
sign_in user
|
||||
visit admin_conference_path(conference2.short_title)
|
||||
|
||||
expect(page.has_content?('Settings')).to be false
|
||||
expect(page.has_content?('Manage')).to be true
|
||||
expect(page.has_content?('Basics')).to be false
|
||||
expect(page.has_content?('Dashboard')).to be true
|
||||
# expect(page.has_content?('Registrations')).to be false
|
||||
expect(page.has_content?('Events')).to be true
|
||||
expect(page.has_content?('Schedule')).to be true
|
||||
|
|
@ -94,7 +94,7 @@ feature 'Has correct abilities' do
|
|||
expect(page.has_content?('E-Mails')).to be true
|
||||
expect(page.has_content?('Call for papers')).to be true
|
||||
expect(page.has_content?('Questions')).to be false
|
||||
expect(page.has_content?('Commercials')).to be true
|
||||
# expect(page.has_content?('Commercials')).to be true
|
||||
|
||||
visit edit_admin_conference_path(conference2.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
|
@ -143,8 +143,8 @@ feature 'Has correct abilities' do
|
|||
sign_in user
|
||||
visit admin_conference_path(conference3.short_title)
|
||||
|
||||
expect(page.has_content?('Settings')).to be false
|
||||
expect(page.has_content?('Manage')).to be true
|
||||
expect(page.has_content?('Basics')).to be false
|
||||
expect(page.has_content?('Dashboard')).to be true
|
||||
expect(page.has_content?('Registrations')).to be true
|
||||
expect(page.has_content?('Events')).to be false
|
||||
expect(page.has_content?('Schedule')).to be false
|
||||
|
|
@ -156,7 +156,7 @@ feature 'Has correct abilities' do
|
|||
expect(page.has_content?('E-Mails')).to be false
|
||||
expect(page.has_content?('Call for papers')).to be false
|
||||
expect(page.has_content?('Questions')).to be true
|
||||
expect(page.has_content?('Commercials')).to be true
|
||||
# expect(page.has_content?('Commercials')).to be true
|
||||
|
||||
visit edit_admin_conference_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
|
@ -206,8 +206,8 @@ feature 'Has correct abilities' do
|
|||
sign_in user
|
||||
visit admin_conference_path(conference4.short_title)
|
||||
|
||||
expect(page.has_content?('Settings')).to be false
|
||||
expect(page.has_content?('Manage')).to be true
|
||||
expect(page.has_content?('Basics')).to be false
|
||||
expect(page.has_content?('Dashboard')).to be true
|
||||
# expect(page.has_content?('Registrations')).to be false
|
||||
expect(page.has_content?('Events')).to be false
|
||||
expect(page.has_content?('Schedule')).to be false
|
||||
|
|
@ -219,7 +219,7 @@ feature 'Has correct abilities' do
|
|||
expect(page.has_content?('E-Mails')).to be false
|
||||
expect(page.has_content?('Call for papers')).to be false
|
||||
expect(page.has_content?('Questions')).to be false
|
||||
expect(page.has_content?('Commercials')).to be true
|
||||
# expect(page.has_content?('Commercials')).to be true
|
||||
|
||||
visit edit_admin_conference_path(conference4.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
|
|
|||
|
|
@ -2,18 +2,16 @@ require 'spec_helper'
|
|||
|
||||
feature Contact do
|
||||
|
||||
# It is necessary to use bang version of let to build roles before user
|
||||
let!(:organizer_role) { create(:organizer_role) }
|
||||
let!(:participant_role) { create(:participant_role) }
|
||||
let!(:admin_role) { create(:admin_role) }
|
||||
let!(:conference) { create(:conference) }
|
||||
let!(:organizer_role) { create(:organizer_role, resource: conference) }
|
||||
let!(:organizer) { create(:user, email: 'admin@example.com', role_ids: [organizer_role.id]) }
|
||||
|
||||
shared_examples 'update a contact' do |user|
|
||||
shared_examples 'update a contact' do
|
||||
|
||||
scenario 'sucessfully', feature: true, js: true do
|
||||
conference = create(:conference)
|
||||
contact = conference.contact
|
||||
expected_count = Contact.count
|
||||
sign_in create(user)
|
||||
sign_in organizer
|
||||
|
||||
visit edit_admin_conference_contact_path(conference.short_title)
|
||||
click_link 'Edit'
|
||||
|
|
@ -39,10 +37,6 @@ feature Contact do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'admin' do
|
||||
it_behaves_like 'update a contact', :admin
|
||||
end
|
||||
|
||||
describe 'organizer' do
|
||||
it_behaves_like 'update a contact', :organizer
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,16 +2,15 @@ require 'spec_helper'
|
|||
|
||||
feature Photo do
|
||||
|
||||
# It is necessary to use bang version of let to build roles before user
|
||||
let!(:organizer_role) { create(:organizer_role) }
|
||||
let!(:participant_role) { create(:participant_role) }
|
||||
let!(:admin_role) { create(:admin_role) }
|
||||
let!(:conference) { create(:conference) }
|
||||
let!(:organizer_role) { create(:organizer_role, resource: conference) }
|
||||
let!(:organizer) { create(:user, email: 'admin@example.com', role_ids: [organizer_role.id]) }
|
||||
|
||||
shared_examples 'add and update photo' do |user|
|
||||
shared_examples 'add and update photo' do
|
||||
scenario 'adds a new photo', feature: true, js: true do
|
||||
expected_count = Photo.count + 1
|
||||
conference = create(:conference)
|
||||
sign_in create(user)
|
||||
|
||||
sign_in organizer
|
||||
|
||||
visit new_admin_conference_photo_path(conference.short_title)
|
||||
|
||||
|
|
@ -28,9 +27,8 @@ feature Photo do
|
|||
|
||||
scenario 'updates a photo', feature: true, js: true do
|
||||
expected_count = Photo.count + 1
|
||||
conference = create(:conference)
|
||||
photo = create(:photo)
|
||||
sign_in create(user)
|
||||
photo = create(:photo, conference_id: conference.id)
|
||||
sign_in organizer
|
||||
|
||||
visit edit_admin_conference_photo_path(conference.short_title, photo.id)
|
||||
|
||||
|
|
@ -47,8 +45,7 @@ feature Photo do
|
|||
|
||||
scenario 'adds a text file', feature: true, js: true do
|
||||
expected_count = Photo.count
|
||||
conference = create(:conference)
|
||||
sign_in create(user)
|
||||
sign_in organizer
|
||||
|
||||
visit new_admin_conference_photo_path(conference.short_title)
|
||||
|
||||
|
|
@ -64,12 +61,8 @@ feature Photo do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'admin' do
|
||||
it_behaves_like 'add and update photo', :admin
|
||||
end
|
||||
|
||||
describe 'organizer' do
|
||||
it_behaves_like 'add and update photo', :organizer
|
||||
it_behaves_like 'add and update photo'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue