diff --git a/app/views/budgets/investments/_milestones.html.erb b/app/views/budgets/investments/_milestones.html.erb index a9de80429..eb151a9ab 100644 --- a/app/views/budgets/investments/_milestones.html.erb +++ b/app/views/budgets/investments/_milestones.html.erb @@ -18,7 +18,7 @@ <% end %> <%= image_tag(milestone.image_url(:large), { alt: milestone.image.title, class: "margin", id: "image_#{milestone.id}" }) if milestone.image.present? %> -
<%= milestone.description %>
+<%= text_with_links milestone.description %>
<% if milestone.documents.present? %>diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index a606721db..845fda155 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -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