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.2.1 test/unit/carriers_test.rb
active_shipping-1.2.0 test/unit/carriers_test.rb
active_shipping-1.1.3 test/unit/carriers_test.rb
active_shipping-1.1.2 test/unit/carriers_test.rb
active_shipping-1.1.1 test/unit/carriers_test.rb
active_shipping-1.1.0 test/unit/carriers_test.rb
active_shipping-1.0.1 test/unit/carriers_test.rb
active_shipping-1.0.0 test/unit/carriers_test.rb
active_shipping-1.0.0.pre4 test/unit/carriers_test.rb
active_shipping-1.0.0.pre3 test/unit/carriers_test.rb