Sha256: 5fc56f68d255d2d2f007cd9816206042a9057cb7d4f38858c00831f7b1e0c43f

Contents?: true

Size: 669 Bytes

Versions: 20

Compression:

Stored size: 669 Bytes

Contents

require 'helper'

module Mollie
  class Customer
    class PaymentTest < Test::Unit::TestCase
      def test_kind_of_payment
        payment = Mollie::Customer::Payment.new({})
        assert_kind_of Mollie::Payment, payment
      end

      def test_list_payments
        stub_request(:get, 'https://api.mollie.com/v2/customers/cus-id/payments')
          .to_return(status: 200, body: %({"_embedded" : { "payments" : [{"id":"pay-id", "customer_id":"cus-id"}]}}), headers: {})

        payments = Payment.all(customer_id: 'cus-id')

        assert_equal 'pay-id', payments.first.id
        assert_equal 'cus-id', payments.first.customer_id
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mollie-api-ruby-4.15.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.14.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.7.1 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.7.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.6.2 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.6.1 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.6.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.5.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.4.1 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.4.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.3.1 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.3.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.2.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.1.5 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.1.4 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.1.3 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.1.2 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.1.1 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.1.0 test/mollie/customer/payment_test.rb
mollie-api-ruby-4.0.1 test/mollie/customer/payment_test.rb