adds question and external link to show spec

This commit is contained in:
rgarcia
2015-09-13 10:31:06 +02:00
parent 5903ebe857
commit d983f9e26d
2 changed files with 3 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ FactoryGirl.define do
sequence(:title) { |n| "Proposal #{n} title" } sequence(:title) { |n| "Proposal #{n} title" }
description 'Proposal description' description 'Proposal description'
question 'Proposal question' question 'Proposal question'
external_url 'http://decide.madrid.es' external_url 'http://external_documention.es'
terms_of_service '1' terms_of_service '1'
association :author, factory: :user association :author, factory: :user

View File

@@ -40,7 +40,9 @@ feature 'Proposals' do
visit proposal_path(proposal) visit proposal_path(proposal)
expect(page).to have_content proposal.title expect(page).to have_content proposal.title
expect(page).to have_content "Proposal question"
expect(page).to have_content "Proposal description" expect(page).to have_content "Proposal description"
expect(page).to have_content "http://external_documention.es"
expect(page).to have_content proposal.author.name expect(page).to have_content proposal.author.name
expect(page).to have_content I18n.l(proposal.created_at.to_date) expect(page).to have_content I18n.l(proposal.created_at.to_date)
expect(page).to have_selector(avatar(proposal.author.name)) expect(page).to have_selector(avatar(proposal.author.name))