Removes poll::question.summary from specs

This commit is contained in:
kikito
2017-01-30 18:39:37 +01:00
parent bc763c34c2
commit cca6758f71

View File

@@ -25,7 +25,6 @@ feature 'Admin poll questions' do
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.description)
expect(page).to have_content(question.summary)
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
@@ -33,7 +32,6 @@ feature 'Admin poll questions' do
scenario 'Create' do scenario 'Create' do
poll = create(:poll, name: 'Movies') poll = create(:poll, name: 'Movies')
title = "Star Wars: Episode IV - A New Hope" title = "Star Wars: Episode IV - A New Hope"
summary = "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire"
description = %{ description = %{
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet. During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the DEATH STAR, an armored space station with enough power to destroy an entire planet.
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.... 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....
@@ -44,14 +42,12 @@ 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_summary', with: summary
fill_in 'poll_question_description', with: description fill_in 'poll_question_description', with: description
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(description)
expect(page).to have_content(summary)
end end
scenario 'Create from successful proposal index' do scenario 'Create from successful proposal index' do
@@ -63,7 +59,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_summary', with: proposal.summary)
expect(page).to have_field('poll_question_description', with: proposal.description) 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")
@@ -72,7 +67,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.summary)
expect(page).to have_content(proposal.description) 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))