Adds links to milestone description

This commit is contained in:
decabeza
2018-02-14 18:13:46 +01:00
parent a950bb03a7
commit 1cc799ef11
2 changed files with 4 additions and 3 deletions

View File

@@ -18,7 +18,7 @@
</span>
<% end %>
<%= image_tag(milestone.image_url(:large), { alt: milestone.image.title, class: "margin", id: "image_#{milestone.id}" }) if milestone.image.present? %>
<p><%= milestone.description %></p>
<p><%= text_with_links milestone.description %></p>
<% if milestone.documents.present? %>
<div class="document-link text-center">
<p>

View File

@@ -931,7 +931,7 @@ feature 'Budget Investments' do
user = create(:user)
investment = create(:budget_investment)
create(:budget_investment_milestone, investment: investment,
description: "Last milestone",
description: "Last milestone with a link to https://consul.dev",
publication_date: Date.tomorrow)
first_milestone = create(:budget_investment_milestone, investment: investment,
description: "First milestone",
@@ -945,12 +945,13 @@ feature 'Budget Investments' do
find("#tab-milestones-label").trigger('click')
within("#tab-milestones") do
expect(first_milestone.description).to appear_before('Last milestone')
expect(first_milestone.description).to appear_before('Last milestone with a link to https://consul.dev')
expect(page).to have_content(Date.tomorrow)
expect(page).to have_content(Date.yesterday)
expect(page).not_to have_content(Date.current)
expect(page.find("#image_#{first_milestone.id}")['alt']).to have_content(image.title)
expect(page).to have_link(document.title)
expect(page).to have_link("https://consul.dev")
end
end