Sha256: 5dc0a9f24ea947d9ddf1afef76d3d20bae3db33bfe7a16c962cbd022c7b91604
Contents?: true
Size: 774 Bytes
Versions: 35
Compression:
Stored size: 774 Bytes
Contents
require 'test_helper' class Kaui::InvoiceTest < ActiveSupport::TestCase test 'can convert to money' do invoice = Kaui::Invoice.new(:amount => 12.42, :balance => 54.32, :refund_adj => 48, :credit_adj => 1.2, :currency => 'USD') assert_equal 1242, invoice.amount_to_money.cents assert_equal 'USD', invoice.amount_to_money.currency_as_string assert_equal 5432, invoice.balance_to_money.cents assert_equal 'USD', invoice.balance_to_money.currency_as_string assert_equal 4800, invoice.refund_adjustment_to_money.cents assert_equal 'USD', invoice.refund_adjustment_to_money.currency_as_string assert_equal 120, invoice.credit_adjustment_to_money.cents assert_equal 'USD', invoice.credit_adjustment_to_money.currency_as_string end end
Version data entries
35 entries across 35 versions & 1 rubygems