fixes question specs

This commit is contained in:
kikito
2017-01-25 18:43:30 +01:00
parent d9351b123d
commit d8b54d2adc

View File

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