Merge pull request #550 from AyuntamientoMadrid/admin-info
adds extra info for proposals in admin listing
This commit is contained in:
@@ -11,7 +11,15 @@
|
||||
<strong><%= proposal.title %></strong>
|
||||
<br>
|
||||
<div class="moderation-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
<%= proposal.description %>
|
||||
<% if proposal.external_url.present? %>
|
||||
<p><%= text_with_links proposal.external_url %></p>
|
||||
<% end %>
|
||||
<% if proposal.video_url.present? %>
|
||||
<p><%= text_with_links proposal.video_url %></p>
|
||||
<% end %>
|
||||
<p><%= proposal.question %></p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user