Adapt tests to new, pickier Capybara

This commit is contained in:
James Mason 2018-11-19 09:36:39 -08:00
parent b66846f726
commit dc0716f504
No known key found for this signature in database
GPG key ID: 1B3951886C449023
4 changed files with 8 additions and 12 deletions

View file

@ -69,7 +69,7 @@ feature Role do
bootstrap_switch = first('td').find('.bootstrap-switch-container')
bootstrap_switch.click
expect(find('.alert').text).to eq "× Successfully removed role #{role_name} from user #{user_with_role.email}"
expect(page).to have_css('.alert', text: "Successfully removed role #{role_name} from user #{user_with_role.email}")
expect(by_role_name).to eq(role_name) | eq('organizer')
user_with_role.reload
expect(user_with_role.has_cached_role?(role_name, conference)).to eq false