API v1 financial_transactions endpoints (#627)
This commit is contained in:
parent
8c8b42c2b2
commit
b96ce06d94
10 changed files with 397 additions and 1 deletions
15
spec/factories/financial_transaction.rb
Normal file
15
spec/factories/financial_transaction.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
require 'factory_bot'
|
||||
|
||||
FactoryBot.define do
|
||||
factory :financial_transaction do
|
||||
user
|
||||
ordergroup
|
||||
amount { rand(-99_999.00..99_999.00) }
|
||||
note { Faker::Lorem.sentence }
|
||||
|
||||
# This builds a new type and class by default, while for normal financial
|
||||
# transactions we'd use the default. This, however, is the easiest way to
|
||||
# get the factory going. If you want equal types, specify it explicitly.
|
||||
financial_transaction_type
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue