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.15 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.36 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.14 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.35 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.13 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.34 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.12 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.33 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.11 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.10 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.32 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.9 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.31 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.8 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.30 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.7 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.29 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.6 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.28 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.5 vendor/active_shipping/test/unit/carriers_test.rb