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.5.27 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.26 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.45 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.25 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.23 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.44 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.22 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.43 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.21 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.42 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.20 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.41 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.19 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.40 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.18 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.39 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.17 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.38 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.16 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.37 vendor/active_shipping/test/unit/carriers_test.rb