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.6.6 test/unit/kaui/refund_test.rb
kaui-0.6.5 test/unit/kaui/refund_test.rb
kaui-0.6.4 test/unit/kaui/refund_test.rb
kaui-0.6.3 test/unit/kaui/refund_test.rb
kaui-0.6.2 test/unit/kaui/refund_test.rb
kaui-0.6.1 test/unit/kaui/refund_test.rb
kaui-0.6.0 test/unit/kaui/refund_test.rb
kaui-0.5.3 test/unit/kaui/refund_test.rb
kaui-0.5.2 test/unit/kaui/refund_test.rb
kaui-0.5.1 test/unit/kaui/refund_test.rb
kaui-0.5.0 test/unit/kaui/refund_test.rb
kaui-0.4.9 test/unit/kaui/refund_test.rb
kaui-0.4.8 test/unit/kaui/refund_test.rb
kaui-0.4.7 test/unit/kaui/refund_test.rb
kaui-0.4.6 test/unit/kaui/refund_test.rb
kaui-0.4.5 test/unit/kaui/refund_test.rb
kaui-0.4.4 test/unit/kaui/refund_test.rb
kaui-0.4.3 test/unit/kaui/refund_test.rb
kaui-0.4.2 test/unit/kaui/refund_test.rb
kaui-0.4.1 test/unit/kaui/refund_test.rb