tab/spec/factories/transactions.rb

24 lines
628 B
Ruby
Raw Normal View History

2015-09-08 11:44:40 +02:00
# == Schema Information
#
# Table name: transactions
#
# id :integer not null, primary key
# debtor_id :integer not null
# creditor_id :integer not null
# amount :integer default(0), not null
# origin :string not null
# message :string
# created_at :datetime not null
# updated_at :datetime not null
#
2015-09-08 11:30:11 +02:00
FactoryGirl.define do
factory :transaction do
2015-09-08 14:00:11 +02:00
association :debtor, factory: :user
association :creditor, factory: :user
2015-09-08 13:37:30 +02:00
amount { rand(100) }
origin 'FactoryGirl'
message { Faker::Lorem.sentence }
2015-09-08 11:30:11 +02:00
end
end