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>
|
<strong><%= proposal.title %></strong>
|
||||||
<br>
|
<br>
|
||||||
<div class="moderation-description">
|
<div class="moderation-description">
|
||||||
|
<p><%= proposal.summary %></p>
|
||||||
<%= proposal.description %>
|
<%= 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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ FactoryGirl.define do
|
|||||||
description 'Proposal description'
|
description 'Proposal description'
|
||||||
question 'Proposal question'
|
question 'Proposal question'
|
||||||
external_url 'http://external_documention.es'
|
external_url 'http://external_documention.es'
|
||||||
|
video_url 'http://video_link.com'
|
||||||
responsible_name 'John Snow'
|
responsible_name 'John Snow'
|
||||||
terms_of_service '1'
|
terms_of_service '1'
|
||||||
association :author, factory: :user
|
association :author, factory: :user
|
||||||
|
|||||||
@@ -7,6 +7,18 @@ feature 'Admin proposals' do
|
|||||||
login_as(admin.user)
|
login_as(admin.user)
|
||||||
end
|
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
|
scenario 'Restore' do
|
||||||
proposal = create(:proposal, :hidden)
|
proposal = create(:proposal, :hidden)
|
||||||
visit admin_proposals_path
|
visit admin_proposals_path
|
||||||
|
|||||||
Reference in New Issue
Block a user