Sha256: 9f43ca8fc10d94ccc7d76b4a99f43d35445c3d18289e0de2973b319083a85e5b

Contents?: true

Size: 457 Bytes

Versions: 35

Compression:

Stored size: 457 Bytes

Contents

require 'test_helper'

class Kaui::AccountTest < ActiveSupport::TestCase

  test 'can convert to money' do
    account = Kaui::Account.new(:account_balance => 12.42, :account_cba => 54.32, :currency => 'USD')

    assert_equal 1242, account.balance_to_money.cents
    assert_equal 'USD', account.balance_to_money.currency_as_string

    assert_equal 5432, account.cba_to_money.cents
    assert_equal 'USD', account.cba_to_money.currency_as_string
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
kaui-2.0.4 test/unit/kaui/account_test.rb
kaui-2.0.3 test/unit/kaui/account_test.rb
kaui-2.0.2 test/unit/kaui/account_test.rb
kaui-2.0.1 test/unit/kaui/account_test.rb
kaui-2.0.0 test/unit/kaui/account_test.rb
kaui-1.4.1 test/unit/kaui/account_test.rb
kaui-1.4.0 test/unit/kaui/account_test.rb
kaui-1.3.0 test/unit/kaui/account_test.rb
kaui-1.2.0 test/unit/kaui/account_test.rb
kaui-1.1.0 test/unit/kaui/account_test.rb
kaui-1.0.0 test/unit/kaui/account_test.rb
kaui-0.16.2 test/unit/kaui/account_test.rb
kaui-0.16.1 test/unit/kaui/account_test.rb
kaui-0.16.0 test/unit/kaui/account_test.rb
kaui-0.15.5 test/unit/kaui/account_test.rb
kaui-0.15.4 test/unit/kaui/account_test.rb
kaui-0.15.3 test/unit/kaui/account_test.rb
kaui-0.15.2 test/unit/kaui/account_test.rb
kaui-0.15.1 test/unit/kaui/account_test.rb
kaui-0.15.0 test/unit/kaui/account_test.rb