fixes question specs
This commit is contained in:
@@ -62,8 +62,7 @@ feature 'Poll Questions' do
|
||||
login_as(create(:user, :level_two, geozone: geozone))
|
||||
visit question_path(question)
|
||||
|
||||
expect(page).to have_link('Han Solo')
|
||||
expect(page).to have_link('Chewbacca')
|
||||
expect(page).to have_link('Answer this question')
|
||||
end
|
||||
|
||||
scenario 'Level 2 users who have already answered' do
|
||||
@@ -75,9 +74,7 @@ feature 'Poll Questions' do
|
||||
login_as user
|
||||
visit question_path(question)
|
||||
|
||||
expect(page).to have_link('Han Solo')
|
||||
expect(page).to_not have_link('Chewbacca')
|
||||
expect(page).to have_content('Chewbacca')
|
||||
expect(page).to have_link('Answer this question')
|
||||
end
|
||||
|
||||
scenario 'Level 2 users answering', :js do
|
||||
@@ -87,10 +84,7 @@ feature 'Poll Questions' do
|
||||
login_as user
|
||||
visit question_path(question)
|
||||
|
||||
click_link 'Han Solo'
|
||||
|
||||
expect(page).to_not have_link('Han Solo')
|
||||
expect(page).to have_link('Chewbacca')
|
||||
expect(page).to have_link('Answer this question')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user