Replace flash helper with "within"
So we can't forget to find "#flash" on the page ever again...
This commit is contained in:
parent
bc1a21ae46
commit
df0b9ab356
29 changed files with 116 additions and 180 deletions
|
|
@ -14,9 +14,9 @@ feature 'Has correct abilities' do
|
|||
|
||||
scenario 'for administration views' do
|
||||
visit admin_conference_path(conference.short_title)
|
||||
page.find('#flash')
|
||||
|
||||
expect(current_path).to eq root_path
|
||||
expect(flash).to eq 'You are not authorized to access this page.'
|
||||
within('#flash') { expect(page).to have_text('You are not authorized to access this page.') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue