osem-fcy/spec/factories/payments.rb

21 lines
473 B
Ruby
Raw Normal View History

2016-07-06 12:40:42 +05:30
FactoryGirl.define do
factory :payment do
first_name { "#{Faker::Hipster.word} abc" }
last_name { "#{Faker::Hipster.word} xyz" }
2016-07-19 12:37:19 +05:30
credit_card_number '4242424242424111'
card_verification_value '123'
expiration_month 6
2016-07-06 12:40:42 +05:30
expiration_year { Date.current.year + 2 }
2016-07-19 12:37:19 +05:30
amount 10
end
trait :invalid_credit_card do
credit_card_number '4242424242424222'
end
trait :exception_credit_card do
credit_card_number '4242424242424333'
2016-07-06 12:40:42 +05:30
end
end
2016-07-19 12:37:19 +05:30