Fix investment creation for single budget usage
Budget Investment factory creates a secondary budget as a collateral effect because it has a Heading factory that has a Group factory that creates a Budget. This was resulting in problems due to having two "active" Budgets created and `current_budget` method not choosing the one that we expected
This commit is contained in:
@@ -5,7 +5,9 @@ feature 'Internal valuation comments on Budget::Investments' do
|
||||
let(:valuator_user) { create(:valuator).user }
|
||||
let(:admin_user) { create(:administrator).user }
|
||||
let(:budget) { create(:budget, :valuating) }
|
||||
let(:investment) { create(:budget_investment, budget: budget) }
|
||||
let(:group) { create(:budget_group, budget: budget) }
|
||||
let(:heading) { create(:budget_heading, group: group) }
|
||||
let(:investment) { create(:budget_investment, budget: budget, group: group, heading: heading) }
|
||||
|
||||
background do
|
||||
Setting['feature.budgets'] = true
|
||||
|
||||
Reference in New Issue
Block a user