Merge pull request #3065 from microweb10/poll_question_create_from_proposal_show

Add missing feature spec: Admin poll questions Create from successful proposal show
This commit is contained in:
Julian Nicolas Herrero
2018-12-05 10:11:08 +01:00
committed by GitHub

View File

@@ -72,7 +72,16 @@ feature 'Admin poll questions' do
expect(page).to have_link(proposal.author.name, href: user_path(proposal.author))
end
pending "Create from successul proposal show"
scenario "Create from successful proposal show" do
poll = create(:poll, name: 'Proposals')
proposal = create(:proposal, :successful)
visit proposal_path(proposal)
click_link "Create question"
expect(page).to have_current_path(new_admin_question_path, ignore_query: true)
expect(page).to have_field('Question', with: proposal.title)
end
scenario 'Update' do
question1 = create(:poll_question)