displays link to valuation section

This commit is contained in:
rgarcia
2017-03-24 15:24:37 +01:00
parent cfac1ebcc7
commit 386f935cc6
2 changed files with 8 additions and 1 deletions

View File

@@ -11,7 +11,8 @@
</li> </li>
<% end %> <% end %>
<% if feature?(:spending_proposals) && (current_user.administrator? || current_user.valuator?) %> <% if (feature?(:spending_proposals) || feature?(:budgets)) &&
(current_user.administrator? || current_user.valuator?) %>
<li> <li>
<%= link_to t("layouts.header.valuation"), valuation_root_path %> <%= link_to t("layouts.header.valuation"), valuation_root_path %>
</li> </li>

View File

@@ -13,6 +13,12 @@ feature 'Valuation budget investments' do
expect{ visit valuation_budget_budget_investments_path(create(:budget)) }.to raise_exception(FeatureFlags::FeatureDisabled) expect{ visit valuation_budget_budget_investments_path(create(:budget)) }.to raise_exception(FeatureFlags::FeatureDisabled)
end end
scenario 'Display link to valuation section' do
Setting['feature.budgets'] = true
visit root_path
expect(page).to have_link "Valuation", href: valuation_root_path
end
scenario 'Index shows budget investments assigned to current valuator' do scenario 'Index shows budget investments assigned to current valuator' do
investment1 = create(:budget_investment, budget: @budget) investment1 = create(:budget_investment, budget: @budget)
investment2 = create(:budget_investment, budget: @budget) investment2 = create(:budget_investment, budget: @budget)