Sha256: 6c59077a1f32d9cc756a267930a5f03c61ef42fb513bca073ff8200a0ddadec0
Contents?: true
Size: 630 Bytes
Versions: 62
Compression:
Stored size: 630 Bytes
Contents
require 'test_helper' module Workarea class PricingOverrideParamsTest < TestCase def test_to_h params = PricingOverrideParams.new(subtotal_adjustment: '3.50') assert_equal({ 'subtotal_adjustment' => -3.5 }, params.to_h) user = create_user params = PricingOverrideParams.new( { subtotal_adjustment: '3.50', shipping_adjustment: '-1' }, user ) assert_equal( { 'subtotal_adjustment' => -3.5, 'shipping_adjustment' => 1.0, 'created_by_id' => user.id }, params.to_h ) end end end
Version data entries
62 entries across 62 versions & 1 rubygems