Use paths instead of URLs where possible
It simplifies the code and solves any issue we might have configuring the host in the test environment.
This commit is contained in:
@@ -98,19 +98,19 @@
|
||||
<% show_links = show_links_to_budget_investments(current_budget) %>
|
||||
<% if show_links %>
|
||||
<li>
|
||||
<%= link_to budget_url(current_budget) do %>
|
||||
<%= link_to budget_path(current_budget) do %>
|
||||
<small><%= t("budgets.index.investment_proyects") %></small>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link_to budget_url(current_budget, filter: "unfeasible") do %>
|
||||
<%= link_to budget_path(current_budget, filter: "unfeasible") do %>
|
||||
<small><%= t("budgets.index.unfeasible_investment_proyects") %></small>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if show_links %>
|
||||
<li>
|
||||
<%= link_to budget_url(current_budget, filter: "unselected") do %>
|
||||
<%= link_to budget_path(current_budget, filter: "unselected") do %>
|
||||
<small><%= t("budgets.index.not_selected_investment_proyects") %></small>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
@@ -76,13 +76,13 @@
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= link_to budget_url(@budget) do %>
|
||||
<%= link_to budget_path(@budget) do %>
|
||||
<small><%= t("budgets.results.investment_proyects") %></small>
|
||||
<% end %><br>
|
||||
<%= link_to budget_url(@budget, filter: "unfeasible") do %>
|
||||
<%= link_to budget_path(@budget, filter: "unfeasible") do %>
|
||||
<small><%= t("budgets.results.unfeasible_investment_proyects") %></small>
|
||||
<% end %><br>
|
||||
<%= link_to budget_url(@budget, filter: "unselected") do %>
|
||||
<%= link_to budget_path(@budget, filter: "unselected") do %>
|
||||
<small><%= t("budgets.results.not_selected_investment_proyects") %></small>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
@@ -120,13 +120,13 @@ describe "Budgets" do
|
||||
expect(page).to have_content "#{heading.name} €1,000,000"
|
||||
|
||||
expect(page).to have_link "List of all investment projects",
|
||||
href: budget_url(budget)
|
||||
href: budget_path(budget)
|
||||
|
||||
expect(page).to have_link "List of all unfeasible investment projects",
|
||||
href: budget_url(budget, filter: "unfeasible")
|
||||
href: budget_path(budget, filter: "unfeasible")
|
||||
|
||||
expect(page).to have_link "List of all investment projects not selected for balloting",
|
||||
href: budget_url(budget, filter: "unselected")
|
||||
href: budget_path(budget, filter: "unselected")
|
||||
|
||||
expect(page).to have_css("div.map")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user