adds admin polls answer video specs

This commit is contained in:
decabeza
2017-10-16 13:14:15 +02:00
parent ba9814cd85
commit c9a3bcc65a

View File

@@ -39,6 +39,31 @@ feature 'Answers' do
expect(page).to have_content "Adding more trees, creating a play area..."
end
scenario 'Add video to answer' do
question = create(:poll_question)
answer1 = create(:poll_question_answer, question: question)
answer2 = create(:poll_question_answer, question: question)
visit admin_question_path(question)
within("#poll_question_answer_#{answer1.id}") do
click_link "Video list"
end
click_link "Add video"
fill_in "poll_question_answer_video_title", with: "Awesome project video"
fill_in "poll_question_answer_video_url", with: "https://www.youtube.com/watch?v=123"
click_button "Save"
within("#poll_question_answer_video_#{answer1.id}") do
expect(page).to have_content "Awesome project video"
expect(page).to have_content "https://www.youtube.com/watch?v=123"
end
end
pending "Update"
pending "Destroy"