test/mollie/settlement/chargeback_test.rb in mollie-api-ruby-3.1.5 vs test/mollie/settlement/chargeback_test.rb in mollie-api-ruby-4.0.0.pre.alpha.1

- old
+ new

@@ -7,16 +7,14 @@ chargeback = Mollie::Settlement::Chargeback.new({}) assert_kind_of Mollie::Chargeback, chargeback end def test_list_chargebacks - stub_request(:get, "https://api.mollie.nl/v1/settlements/set-id/chargebacks?count=50&offset=0") - .to_return(:status => 200, :body => %{{"data" : [{"id":"chg-id", "settlement_id":"set-id"}]}}, :headers => {}) + stub_request(:get, "https://api.mollie.com/v2/settlements/set-id/chargebacks") + .to_return(:status => 200, :body => %{{"_embedded" : { "chargebacks" : [{"id":"chg-id", "settlement_id":"set-id"}]}} }, :headers => {}) chargebacks = Chargeback.all(settlement_id: "set-id") - assert_equal "chg-id", chargebacks.first.id - assert_equal "set-id", chargebacks.first.settlement_id end end end end