Fix link to create a new budget investment

This commit is contained in:
Javi Martín
2018-11-06 13:17:39 +01:00
parent ab870c756a
commit 9bacf39647
2 changed files with 10 additions and 1 deletions

View File

@@ -33,7 +33,7 @@
<% if current_user %>
<% if current_user.level_two_or_three_verified? %>
<%= link_to t("budgets.investments.index.sidebar.create"),
new_budget_investment_path(@budget),
new_budget_investment_path(current_budget),
class: "button margin-top expanded" %>
<% else %>
<div class="callout warning margin-top">

View File

@@ -124,6 +124,15 @@ feature 'Budgets' do
expect(page).to have_content "There are no budgets"
end
scenario "Accepting" do
budget.update(phase: "accepting")
login_as(create(:user, :level_two))
visit budgets_path
expect(page).to have_link "Create a budget investment"
end
end
scenario 'Index shows only published phases' do