Sha256: ecdb41352f4204f9da8a5d9458b0b3f609baea8223372c262734f4794d64cf7a

Contents?: true

Size: 987 Bytes

Versions: 35

Compression:

Stored size: 987 Bytes

Contents

require 'test_helper'

class RemoteUPSSurepostTest < Minitest::Test
  include ActiveShipping::Test::Credentials
  include ActiveShipping::Test::Fixtures

  def setup
    @options = credentials(:ups_surepost).merge(:test => true)
    @carrier = UPS.new(@options)
  rescue NoCredentialsFound => e
    skip(e.message)
  end

  def test_obtain_surpost_less_than_one_lb_shipping_label
    response = @carrier.create_shipment(
      location_fixtures[:beverly_hills],
      location_fixtures[:new_york_with_name],
      package_fixtures.values_at(:small_half_pound),
      {
        :test => true,
        :service_code => "92"
      }
    )

    assert response.success?

    # All behavior specific to how a LabelResponse behaves in the
    # context of UPS label data is a matter for unit tests.  If
    # the data changes substantially, the create_shipment
    # ought to raise an exception and this test will fail.
    assert_instance_of ActiveShipping::LabelResponse, response
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
active_shipping-1.14.2 test/remote/ups_surepost_test.rb
active_shipping-1.14.1 test/remote/ups_surepost_test.rb
active_shipping-1.14.0 test/remote/ups_surepost_test.rb
active_shipping-1.13.4 test/remote/ups_surepost_test.rb
active_shipping-1.13.3 test/remote/ups_surepost_test.rb
active_shipping-1.13.2 test/remote/ups_surepost_test.rb
active_shipping-1.13.1 test/remote/ups_surepost_test.rb
active_shipping-1.13.0 test/remote/ups_surepost_test.rb
active_shipping-1.12.1 test/remote/ups_surepost_test.rb
active_shipping-1.12.0 test/remote/ups_surepost_test.rb
active_shipping-1.11.1 test/remote/ups_surepost_test.rb
active_shipping-1.11.0 test/remote/ups_surepost_test.rb
active_shipping-1.10.1 test/remote/ups_surepost_test.rb
active_shipping-1.9.2 test/remote/ups_surepost_test.rb
active_shipping-1.9.1 test/remote/ups_surepost_test.rb
active_shipping-1.9.0 test/remote/ups_surepost_test.rb
active_shipping-1.8.6 test/remote/ups_surepost_test.rb
active_shipping-1.8.5 test/remote/ups_surepost_test.rb
active_shipping-1.8.4 test/remote/ups_surepost_test.rb
active_shipping-1.8.3 test/remote/ups_surepost_test.rb