From d819a9ccbc8d5c850fb0d4f93369a01d47c6223a Mon Sep 17 00:00:00 2001 From: Julian Herrero Date: Sun, 2 Dec 2018 17:12:57 +0100 Subject: [PATCH] add missing spec --- spec/features/admin/poll/questions_spec.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spec/features/admin/poll/questions_spec.rb b/spec/features/admin/poll/questions_spec.rb index 4374800f2..5fedcbb34 100644 --- a/spec/features/admin/poll/questions_spec.rb +++ b/spec/features/admin/poll/questions_spec.rb @@ -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)