Sha256: 7cf52d45241c6dadfeac3c7df0c9c13d57fdf7702d2146a7f70520d3e5754f2a
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
# Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do factory :tb_checkout_transaction, :class => 'TbCheckout::Transaction' do association :cart, :factory => :tb_checkout_cart spud_user nil amount_charged 0 card_type "visa" card_number "4024007152451281" session_id "8f74e68687a91c13901ae8809e8fdb6b" # The following is NOT a valid cc number and should throw a basic validation error trait :with_invalid_card do card_number "4024007152451280" end # The following will trigger a gateway exception in ActiveMerchant::Billing::BogusGateway trait :with_exception_card do card_number "4556674473967422" end card_expiration { Date.today.next_year } card_ccv 123 billing_first_name "John" billing_last_name "Doe" billing_address_1 "21 S Range Line Rd" billing_address_2 "STE 200" billing_city "Carmel" billing_state "IN" billing_postal 46032 trait :captured do after(:create) { |t| t.capture! } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tb_checkout-1.1.1 | spec/factories/tb_checkout_transactions.rb |
tb_checkout-1.1.0 | spec/factories/tb_checkout_transactions.rb |