Fixes failing specs

This commit is contained in:
kikito
2017-01-24 18:10:41 +01:00
parent 6ed73f34b6
commit 15b531f068
5 changed files with 54 additions and 39 deletions

View File

@@ -18,7 +18,8 @@ feature 'Admin poll questions' do
scenario 'Show' do
geozone = create(:geozone)
question = create(:poll_question, geozone_ids: geozone.id)
poll = create(:poll, geozone_restricted: true, geozone_ids: [geozone.id])
question = create(:poll_question, poll: poll)
visit admin_question_path(question)
@@ -27,7 +28,6 @@ feature 'Admin poll questions' do
expect(page).to have_content(question.summary)
expect(page).to have_content(question.author.name)
expect(page).to have_content(question.valid_answers.join(" "))
expect(page).to have_content(geozone.name)
end
scenario 'Create' do
@@ -53,7 +53,6 @@ feature 'Admin poll questions' do
end
scenario 'Create from successful proposal index' do
geozones = create_list(:geozone, 3)
proposal = create(:proposal, :successful)
visit proposals_path
@@ -115,4 +114,4 @@ feature 'Admin poll questions' do
pending "Mark all city by default when creating a poll question from a successful proposal"
end
end