Create traits for budget group & heading with drafting budget

This commit is contained in:
Bertocq
2018-02-04 22:38:23 +01:00
parent 8f72972344
commit 8e6e360fc8

View File

@@ -278,6 +278,10 @@ FactoryBot.define do
factory :budget_group, class: 'Budget::Group' do
budget
sequence(:name) { |n| "Group #{n}" }
trait :drafting_budget do
association :budget, factory: [:budget, :drafting]
end
end
factory :budget_heading, class: 'Budget::Heading' do
@@ -285,6 +289,10 @@ FactoryBot.define do
sequence(:name) { |n| "Heading #{n}" }
price 1000000
population 1234
trait :drafting_budget do
association :group, factory: [:budget_group, :drafting_budget]
end
end
factory :budget_investment, class: 'Budget::Investment' do