Sha256: 4c048db70a70ebca82edf7ddcb34434debd5c400e82608e36424bf026387d02a
Contents?: true
Size: 525 Bytes
Versions: 30
Compression:
Stored size: 525 Bytes
Contents
require 'test_helper' class ShippingCostCalculatorTest < ActiveRecord::TestCase test "shipping method is nil" do order = Order.new calculator= ShippingCostCalculator.new(order) assert_equal 0, calculator.shipping_cost end test "shipping method is not nil" do shipping_method = build :country_shipping_method order = build :order, shipping_method: shipping_method calculator= ShippingCostCalculator.new(order) assert_equal 2.99, calculator.shipping_cost.round(2).to_f end end
Version data entries
30 entries across 30 versions & 1 rubygems