Sha256: 5101784f2e4cf5c9e8876931d9ea0a2cf70a0aee79844d4c86788fa0848dfe98

Contents?: true

Size: 312 Bytes

Versions: 12

Compression:

Stored size: 312 Bytes

Contents

require 'test_helper'

class TaxCalculatorTest < ActiveRecord::TestCase

  test "tax for the order" do
    order = create :order_with_line_items
    Shop.first.update_column(:tax_percentage, 10)

    assert_equal 50.00, order.reload.line_items_total
    assert_equal 5.0, TaxCalculator.new(order).tax
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.4.beta1 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.4 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.3 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.2 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.2.beta1 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1.rc6 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1.rc5 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1.rc4 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1.rc3 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1.rc2 test/unit/tax_calculator_test.rb
nimbleshop_core-0.0.1.rc1 test/unit/tax_calculator_test.rb