Sha256: 1486f79d3a13ccf54f02c73d5afec658cf9432983317693157ec864c7e07f731

Contents?: true

Size: 684 Bytes

Versions: 10

Compression:

Stored size: 684 Bytes

Contents

require 'test_helper'

class Kaui::RefundTest < ActiveSupport::TestCase
  fixtures :refunds

  test "can serialize from json" do
    as_json = refunds(:refund_for_pierre)
    refund = Kaui::Refund.new(as_json)
    
    assert_equal as_json["refundId"], refund.refund_id
    assert_equal as_json["paymentId"], refund.payment_id
    assert_equal as_json["amount"], refund.amount
    assert_equal as_json["currency"], refund.currency
    assert_equal as_json["adjusted"], refund.adjusted
    assert_equal as_json["requestedDate"], refund.requested_date
    assert_equal as_json["effectiveDate"], refund.effective_date
    assert_equal as_json["adjustments"], refund.adjustments
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kaui-0.1.11 test/unit/kaui/refund_test.rb
kaui-0.1.10 test/unit/kaui/refund_test.rb
kaui-0.1.9 test/unit/kaui/refund_test.rb
kaui-0.1.8 test/unit/kaui/refund_test.rb
kaui-0.1.7 test/unit/kaui/refund_test.rb
kaui-0.1.6 test/unit/kaui/refund_test.rb
kaui-0.1.5 test/unit/kaui/refund_test.rb
kaui-0.1.4 test/unit/kaui/refund_test.rb
kaui-0.1.3 test/unit/kaui/refund_test.rb
kaui-0.1.2 test/unit/kaui/refund_test.rb