Sha256: f37e442a2260b19029d833eadb7296a3f6c7b0cfd60c3d68b7ef3b25972abd01

Contents?: true

Size: 480 Bytes

Versions: 50

Compression:

Stored size: 480 Bytes

Contents

require 'test_helper'

class CarriersTest < Minitest::Test

  def test_get_usps_by_string
    assert_equal ActiveShipping::USPS, ActiveShipping::Carriers.find('usps')
    assert_equal ActiveShipping::USPS, ActiveShipping::Carriers.find('USPS')
  end

  def test_get_usps_by_name
    assert_equal ActiveShipping::USPS, ActiveShipping::Carriers.find(:usps)
  end

  def test_get_unknown_carrier
    assert_raises(NameError) { ActiveShipping::Carriers.find(:polar_north) }
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
active_shipping-1.14.2 test/unit/carriers_test.rb
active_shipping-1.14.1 test/unit/carriers_test.rb
active_shipping-1.14.0 test/unit/carriers_test.rb
active_shipping-1.13.4 test/unit/carriers_test.rb
active_shipping-1.13.3 test/unit/carriers_test.rb
active_shipping-1.13.2 test/unit/carriers_test.rb
active_shipping-1.13.1 test/unit/carriers_test.rb
active_shipping-1.13.0 test/unit/carriers_test.rb
active_shipping-1.12.1 test/unit/carriers_test.rb
active_shipping-1.12.0 test/unit/carriers_test.rb
active_shipping-1.11.1 test/unit/carriers_test.rb
active_shipping-1.11.0 test/unit/carriers_test.rb
active_shipping-1.10.1 test/unit/carriers_test.rb
active_shipping-1.9.2 test/unit/carriers_test.rb
active_shipping-1.9.1 test/unit/carriers_test.rb
active_shipping-1.9.0 test/unit/carriers_test.rb
active_shipping-1.8.6 test/unit/carriers_test.rb
active_shipping-1.8.5 test/unit/carriers_test.rb
active_shipping-1.8.4 test/unit/carriers_test.rb
active_shipping-1.8.3 test/unit/carriers_test.rb