Sha256: da65259b35daaf5dde37634f437a708d0690e74c3d958fb32839304c06af732b
Contents?: true
Size: 1.15 KB
Versions: 18
Compression:
Stored size: 1.15 KB
Contents
describe 'Roles Admin', type: :feature, js: true do let(:exhibit) { FactoryGirl.create(:exhibit) } let(:exhibit_admin) { FactoryGirl.create(:exhibit_admin, exhibit: exhibit) } before do login_as exhibit_admin visit spotlight.exhibit_dashboard_path(exhibit) click_link 'Users' end it 'has the appropriate status message when an existing user is added' do second_user = FactoryGirl.create(:site_admin) click_link 'Add a new user' fill_in 'User key', with: second_user.email click_button 'Save changes' expect(page).to have_css('.alert-info', text: 'User has been updated.') expect(page).to have_css('.table.users td', text: second_user.email) end it 'persists invited users to the exhibits user list' do expect(page).not_to have_css('.label-warning pending-label', text: 'pending', visible: true) click_link 'Add a new user' fill_in 'User key', with: 'user@example.com' click_button 'Save changes' within('tr.invite-pending') do expect(page).to have_css('td', text: 'user@example.com') expect(page).to have_css('.label-warning.pending-label', text: 'pending', visible: true) end end end
Version data entries
18 entries across 18 versions & 1 rubygems