adds Budget::Group model to group headings

many refactors through budget related models
This commit is contained in:
Juanjo Bazán
2016-06-09 18:00:06 +02:00
parent 3fae269c40
commit b5a6828e41
18 changed files with 156 additions and 110 deletions

View File

@@ -65,7 +65,13 @@ describe "Abilities::Administrator" do
it { should be_able_to(:update, Budget::Investment) }
it { should be_able_to(:hide, Budget::Investment) }
it { should be_able_to(:valuate, create(:budget_investment, budget: create(:budget, valuating: true))) }
it { should_not be_able_to(:valuate, create(:budget_investment, budget: create(:budget, valuating: false))) }
it { should be_able_to(:valuate, create(:budget_investment,
heading: create(:budget_heading,
group: create(:budget_group,
budget: create(:budget, valuating: true))))) }
it { should_not be_able_to(:valuate, create(:budget_investment,
heading: create(:budget_heading,
group: create(:budget_group,
budget: create(:budget, valuating: false))))) }
end