Sha256: a222b132f4857fc5401f6893666888577c1f3ac68b12e90e9f2e8d7bff2a5139
Contents?: true
Size: 665 Bytes
Versions: 4
Compression:
Stored size: 665 Bytes
Contents
require 'test_helper' module Billing class ChargeTest < ActiveSupport::TestCase setup do @charge = billing_charges(:one) end test "args_to_attributes class method" do assert_equal Billing::Charge.args(1), { price: '1 USD'.to_money } assert_equal Billing::Charge.args("1"), { price: '1 USD'.to_money } assert_equal Billing::Charge.args("1 EUR"), { price: '1 EUR'.to_money } assert_equal Billing::Charge.args(1, price_currency: 'USD'), { price: '1 USD'.to_money, price_currency: 'USD' } assert_equal Billing::Charge.args(price: 10, price_currency: 'EUR'), { price: 10, price_currency: 'EUR' } end end end
Version data entries
4 entries across 4 versions & 1 rubygems