Sha256: 5202a173769c40698bd4709d3d66be7fa7b79776645222b9eec1995482e59bdb
Contents?: true
Size: 748 Bytes
Versions: 6
Compression:
Stored size: 748 Bytes
Contents
require 'test_helper' class ShippingMethodTest < ActiveSupport::TestCase context "instance" do setup do create_complete_order end context "when calculator indicates method is supported" do should "be available" do assert(@zone.include?(@order.shipment.address), "Zone doesn't include address") assert(@shipping_method.calculator) assert @shipping_method.available?(@order) end context "when the shipping address falls within the method's zone" do should "return the amount as calculated by the method's calculator" do assert_equal BigDecimal.new("10.0"), @shipping_method.calculate_cost(@order.shipment) end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems