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.27 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.4 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.26 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.3 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.25 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.2 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.24 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.1 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.23 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.22 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.0 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.21 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.5.0.beta.1 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.20 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.19 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.18 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.17 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.16 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.15 vendor/active_shipping/test/unit/carriers_test.rb
workarea-core-3.4.14 vendor/active_shipping/test/unit/carriers_test.rb