Sha256: 2835513db6830c6bd9680f0656d7fc44b6195db00ca52ef1d2627e9b87a6f769

Contents?: true

Size: 629 Bytes

Versions: 19

Compression:

Stored size: 629 Bytes

Contents

require 'helper'

module Mollie
  class Payment
    class ChargebackTest < Test::Unit::TestCase
      def test_kind_of_refund
        chargeback = Mollie::Payment::Chargeback.new({})
        assert_kind_of Mollie::Chargeback, chargeback
      end

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

        chargebacks = Mollie::Payment::Chargeback.all(payment_id: 'pay-id')

        assert_equal 're-id', chargebacks.first.id
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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