spec/support/factories.rb in catarse_pagarme-2.8.8 vs spec/support/factories.rb in catarse_pagarme-2.8.9
- old
+ new
@@ -38,10 +38,23 @@
factory :bank do |f|
f.name { generate(:uid) }
f.code { generate(:serial) }
end
+ factory :balance_transfer do |f|
+ f.association :user
+ f.association :project
+ f.amount 100
+ end
+
+ factory :balance_transaction do |f|
+ f.association :user
+ f.association :project
+ f.amount 100
+ f.event_name 'foo'
+ end
+
factory :bank_account do |f|
f.association :bank
f.account '25334'
f.account_digit '2'
f.agency '1432'
@@ -83,11 +96,11 @@
project.save
end
end
after :build do |project|
project.account = build(:project_account, project: nil)
- project.rewards.build(deliver_at: Time.now, minimum_value: 10, description: 'test')
+ project.rewards.build(deliver_at: 1.year.from_now, minimum_value: 10, description: 'test')
end
end
factory :flexible_project do |f|
f.association :project
@@ -116,24 +129,24 @@
end
factory :project_account do |f|
f.association :project
f.association :bank
+ f.account '25334'
+ f.account_digit '2'
+ f.agency '1432'
+ f.agency_digit '2'
+ f.owner_name 'Lorem amenori'
+ f.owner_document '11111111111'
f.email "foo@bar.com"
f.address_zip_code "foo"
f.address_neighbourhood "foo"
f.address_state "foo"
f.address_city "foo"
f.address_number "foo"
f.address_street "foo"
f.phone_number "1234"
- f.agency "fooo"
- f.agency_digit "foo"
- f.owner_document "foo"
- f.owner_name "foo"
- f.account "1"
- f.account_digit "1000"
f.account_type "foo"
end
factory :contribution do |f|
f.association :project, factory: :project
@@ -153,16 +166,16 @@
end
end
factory :payment do |f|
f.association :contribution
- f.gateway 'pagarme'
+ f.gateway 'Pagarme'
f.value 10.00
f.state 'paid'
f.installment_value nil
f.payment_method "CartaoDeCredito"
after :build do |payment|
- payment.gateway = 'pagarme'
+ payment.gateway = 'Pagarme'
end
end
factory :state do
name { generate(:name) }