Add trait to create a poll associated to a budget

This commit is contained in:
Javi Martín
2019-09-23 05:47:58 +02:00
parent 4edab79910
commit 52e54363ae
7 changed files with 11 additions and 14 deletions

View File

@@ -346,11 +346,9 @@ describe Poll do
describe "#not_budget" do
it "returns polls not associated to a budget" do
budget = create(:budget)
poll1 = create(:poll)
poll2 = create(:poll)
poll3 = create(:poll, budget: budget)
poll3 = create(:poll, :for_budget)
expect(Poll.not_budget).to include(poll1)
expect(Poll.not_budget).to include(poll2)