Added poll questions documents and video specs

New tests to ensure video URL is shown in the admin preview. Also that the video URL and documents are correctly saved after creating a question.
This commit is contained in:
María Checa
2017-09-07 17:19:07 +02:00
parent 355d68c7f8
commit 27ac4c5815
2 changed files with 22 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ feature 'Admin poll questions' do
Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her
people and restore freedom to the galaxy....
}
video_url = "https://puppyvideos.com"
visit admin_questions_path
click_link "Create question"
@@ -45,11 +46,13 @@ feature 'Admin poll questions' do
select 'Movies', from: 'poll_question_poll_id'
fill_in 'poll_question_title', with: title
fill_in 'poll_question_description', with: description
fill_in 'poll_question_video_url', with: video_url
click_button 'Save'
expect(page).to have_content(title)
expect(page).to have_content(description)
expect(page).to have_content(video_url)
end
scenario 'Create from successful proposal index' do