Remove unnecessary attributes in investment specs

The group is automatically assigned when we assign the heading. The
budget isn't needed either, except for a special case related to the
reason to be rejected.
This commit is contained in:
Javi Martín
2019-09-27 01:20:16 +02:00
parent 087b4bf2a6
commit 0719b834c9
6 changed files with 16 additions and 31 deletions

View File

@@ -127,12 +127,9 @@ describe "Admin budget investments" do
group1_heading2 = create(:budget_heading, group: group1, name: "Mercy Street")
group2_heading1 = create(:budget_heading, group: group2, name: "Central Park")
create(:budget_investment, title: "Realocate visitors", budget: budget, group: group1,
heading: group1_heading1)
create(:budget_investment, title: "Change name", budget: budget, group: group1,
heading: group1_heading2)
create(:budget_investment, title: "Plant trees", budget: budget, group: group2,
heading: group2_heading1)
create(:budget_investment, title: "Realocate visitors", heading: group1_heading1)
create(:budget_investment, title: "Change name", heading: group1_heading2)
create(:budget_investment, title: "Plant trees", heading: group2_heading1)
visit admin_budget_budget_investments_path(budget_id: budget.id)