adds spec

This commit is contained in:
Juanjo Bazán
2015-09-24 13:58:01 +02:00
parent 0854f6cd83
commit ba081f73c1
2 changed files with 13 additions and 0 deletions

View File

@@ -124,6 +124,7 @@ FactoryGirl.define do
description 'Proposal description'
question 'Proposal question'
external_url 'http://external_documention.es'
video_url 'http://video_link.com'
responsible_name 'John Snow'
terms_of_service '1'
association :author, factory: :user

View File

@@ -7,6 +7,18 @@ feature 'Admin proposals' do
login_as(admin.user)
end
scenario 'List shows all relevant info' do
proposal = create(:proposal, :hidden)
visit admin_proposals_path
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.question)
expect(page).to have_content(proposal.external_url)
expect(page).to have_content(proposal.video_url)
end
scenario 'Restore' do
proposal = create(:proposal, :hidden)
visit admin_proposals_path