forked from zinc-collective/convene
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🥗🧹
Tobias
: Define Payment
relationships and attributes
This is not super important to the actual feature, but it does mean that the `Payment` has clearly defined relationships, with tests that confirm the relationship. It also adds a spec to check that the `#amount` value operates as a monetized value; which doesn't seem like it does that much beyond giving us an injection point for layering in additional details.
- Loading branch information
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe Tobias::Payment, type: :model do | ||
describe "#payout" do | ||
it { is_expected.to belong_to(:payout).inverse_of(:payments) } | ||
end | ||
|
||
describe "#amount" do | ||
it { is_expected.to monetize(:amount) } | ||
end | ||
end |