Skip to content

Commit

Permalink
🥗 Tobias: Issuing Payouts doesn't create additional payouts per b…
Browse files Browse the repository at this point in the history
…eneficiary

I thought that this would actually be a problem, but apparently it's
not! Hooray for tests!
  • Loading branch information
zspencer committed Jan 29, 2024
1 parent 63f8184 commit aa61795
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/tobias/payout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,17 @@
end
end
end

context "when running twice" do
it "does not issue multiple payouts" do
payout = create(:tobias_payout, amount_cents: 100_00)

create_list(:tobias_beneficiary, 2, trust: payout.trust)

payout.issue

expect { payout.issue }.not_to(change(payout.payments, :count))
end
end
end
end

0 comments on commit aa61795

Please sign in to comment.