Sha256: e8e3f064d996f1cc716dc1fa608158cd28281299ca846442b83364745450b603

Contents?: true

Size: 580 Bytes

Versions: 66

Compression:

Stored size: 580 Bytes

Contents

require 'test_helper'

class CarriersTest < ActiveSupport::TestCase
  test ".find searches by string for a carrier and finds USPS" do
    assert_equal ActiveShipping::USPS, ActiveShipping::Carriers.find('usps')
    assert_equal ActiveShipping::USPS, ActiveShipping::Carriers.find('USPS')
  end

  test ".find searches by symbol for a carrier and finds USPS" do
    assert_equal ActiveShipping::USPS, ActiveShipping::Carriers.find(:usps)
  end

  test ".find raises with an unknown carrier" do
    assert_raises(NameError) { ActiveShipping::Carriers.find(:polar_north) }
  end
end

Version data entries

66 entries across 66 versions & 2 rubygems

Version Path
workarea-core-3.4.13 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.12 vendor/active_shipping/test/unit/carriers_test.rb
active_shipping-2.1.1 test/unit/carriers_test.rb
active_shipping-2.1.0 test/unit/carriers_test.rb
active_shipping-2.0.1 test/unit/carriers_test.rb
active_shipping-2.0.0 test/unit/carriers_test.rb