Sha256: 6b4477b6bd91be97996321adbe6f83e119b200bcce1703034e87daa0757ab641

Contents?: true

Size: 702 Bytes

Versions: 36

Compression:

Stored size: 702 Bytes

Contents

require 'test_helper'

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

  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

36 entries across 36 versions & 1 rubygems

Version Path
kaui-0.4.0 test/unit/kaui/refund_test.rb
kaui-0.3.1 test/unit/kaui/refund_test.rb
kaui-0.3.0 test/unit/kaui/refund_test.rb
kaui-0.2.6 test/unit/kaui/refund_test.rb
kaui-0.2.5 test/unit/kaui/refund_test.rb
kaui-0.2.4 test/unit/kaui/refund_test.rb
kaui-0.2.3 test/unit/kaui/refund_test.rb
kaui-0.2.2 test/unit/kaui/refund_test.rb
kaui-0.2.1 test/unit/kaui/refund_test.rb
kaui-0.2.0 test/unit/kaui/refund_test.rb
kaui-0.1.18 test/unit/kaui/refund_test.rb
kaui-0.1.17 test/unit/kaui/refund_test.rb
kaui-0.1.16 test/unit/kaui/refund_test.rb
kaui-0.1.15 test/unit/kaui/refund_test.rb
kaui-0.1.14 test/unit/kaui/refund_test.rb
kaui-0.1.12 test/unit/kaui/refund_test.rb