test/remote/ups_test.rb in active_shipping-1.6.1 vs test/remote/ups_test.rb in active_shipping-1.6.2

- old
+ new

@@ -357,6 +357,45 @@ def test_maximum_address_field_length assert_equal 35, @carrier.maximum_address_field_length end + + def test_obtain_return_label + response = @carrier.create_shipment( + location_fixtures[:beverly_hills_with_name], + location_fixtures[:real_google_as_commercial], + #package descriptions are required for returns + package_fixtures.values_at(:books), + { + :shipper => location_fixtures[:new_york], + :return_service_code => '9', + :test => true + } + ) + + assert response.success? + + assert_instance_of ActiveShipping::LabelResponse, response + end + + def test_obtain_international_return_label + response = @carrier.create_shipment( + location_fixtures[:ottawa_with_name], + #international return requires destination to have: phone number, name + location_fixtures[:real_google_with_name_phone], + #package descriptions are required for returns + package_fixtures.values_at(:books), + { + #international return requires shipper to have: phone, name + :shipper => location_fixtures[:new_york_with_name], + :service_code => '07', + :return_service_code => '9', + :test => true, + } + ) + + assert response.success? + + assert_instance_of ActiveShipping::LabelResponse, response + end end