Sha256: 9168adbccbdd90079fa98ff257b12d58a7b3007cf372d5bd38e12ff632424452

Contents?: true

Size: 821 Bytes

Versions: 1

Compression:

Stored size: 821 Bytes

Contents

module Workarea
  decorate PaymentTest, with: :global_e do
    def test_global_e_statuses
      payment = Payment.new(
        address: {
          first_name: 'Ben',
          last_name: 'Crouse',
          street: '22 S. 3rd St.',
          street_2: 'Second Floor',
          city: 'Philadelphia',
          region: 'PA',
          postal_code: '19106',
          country: 'US',
          phone_number: '2159251800'
        },
        global_e_payment: {
          name: "Visa",
          payment_method_code: "1",
          last_four: "1111",
          expiration_date: "#{next_year}-06-04"
        }
      )

      assert_equal :pending_global_e_fraud_check, payment.status

      payment.update_attributes(global_e_approved_at: Time.current)

      assert_equal :global_e_approved, payment.status
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workarea-global_e-1.3.0 test/models/workarea/payment_test.decorator