Fixed tests
This commit is contained in:
@@ -24,7 +24,6 @@ feature 'Admin poll questions' do
|
|||||||
visit admin_question_path(question)
|
visit admin_question_path(question)
|
||||||
|
|
||||||
expect(page).to have_content(question.title)
|
expect(page).to have_content(question.title)
|
||||||
expect(page).to have_content(question.description)
|
|
||||||
expect(page).to have_content(question.author.name)
|
expect(page).to have_content(question.author.name)
|
||||||
expect(page).to have_content(question.valid_answers.join(" "))
|
expect(page).to have_content(question.valid_answers.join(" "))
|
||||||
end
|
end
|
||||||
@@ -45,13 +44,11 @@ feature 'Admin poll questions' do
|
|||||||
|
|
||||||
select 'Movies', from: 'poll_question_poll_id'
|
select 'Movies', from: 'poll_question_poll_id'
|
||||||
fill_in 'poll_question_title', with: title
|
fill_in 'poll_question_title', with: title
|
||||||
fill_in 'poll_question_description', with: description
|
|
||||||
fill_in 'poll_question_video_url', with: video_url
|
fill_in 'poll_question_video_url', with: video_url
|
||||||
|
|
||||||
click_button 'Save'
|
click_button 'Save'
|
||||||
|
|
||||||
expect(page).to have_content(title)
|
expect(page).to have_content(title)
|
||||||
expect(page).to have_content(description)
|
|
||||||
expect(page).to have_content(video_url)
|
expect(page).to have_content(video_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -64,7 +61,6 @@ feature 'Admin poll questions' do
|
|||||||
|
|
||||||
expect(current_path).to eq(new_admin_question_path)
|
expect(current_path).to eq(new_admin_question_path)
|
||||||
expect(page).to have_field('poll_question_title', with: proposal.title)
|
expect(page).to have_field('poll_question_title', with: proposal.title)
|
||||||
expect(page).to have_field('poll_question_description', with: proposal.description)
|
|
||||||
expect(page).to have_field('poll_question_valid_answers', with: "Yes, No")
|
expect(page).to have_field('poll_question_valid_answers', with: "Yes, No")
|
||||||
|
|
||||||
select 'Proposals', from: 'poll_question_poll_id'
|
select 'Proposals', from: 'poll_question_poll_id'
|
||||||
@@ -72,7 +68,6 @@ feature 'Admin poll questions' do
|
|||||||
click_button 'Save'
|
click_button 'Save'
|
||||||
|
|
||||||
expect(page).to have_content(proposal.title)
|
expect(page).to have_content(proposal.title)
|
||||||
expect(page).to have_content(proposal.description)
|
|
||||||
expect(page).to have_link(proposal.title, href: proposal_path(proposal))
|
expect(page).to have_link(proposal.title, href: proposal_path(proposal))
|
||||||
expect(page).to have_link(proposal.author.name, href: user_path(proposal.author))
|
expect(page).to have_link(proposal.author.name, href: user_path(proposal.author))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -322,5 +322,4 @@ end
|
|||||||
def documentable_fill_new_valid_poll_question
|
def documentable_fill_new_valid_poll_question
|
||||||
page.select documentable.poll.name, from: 'poll_question_poll_id'
|
page.select documentable.poll.name, from: 'poll_question_poll_id'
|
||||||
fill_in 'poll_question_title', with: "Star Wars: Episode IV - A New Hope"
|
fill_in 'poll_question_title', with: "Star Wars: Episode IV - A New Hope"
|
||||||
fill_in_ckeditor "poll_question_description", with: "Description"
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user