Sha256: 18f4d48d240a97f29aad927a193d2c29745e1994b31c474e7ef9c40febb45519

Contents?: true

Size: 737 Bytes

Versions: 6

Compression:

Stored size: 737 Bytes

Contents

require 'spec_helper'

module Fedex
  describe Shipment do
    let (:fedex) { Shipment.new(fedex_credentials) }
    context "#delete" do
      context "delete shipment with tracking number", :vcr do
        let(:options) do
          { :tracking_number => '794608797150' }
        end
        it "deletes a shipment" do
          expect{ fedex.delete(options) }.to_not raise_error
        end
      end
      context "raise an error when the tracking number is invalid", :vcr do
        let(:options) do
          { :tracking_number => '111111111' }
        end

        it "raises an error" do
          expect {fedex.delete(options) }.to raise_error(Fedex::RateError, 'Invalid tracking number')
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fedex-3.10.11 spec/lib/fedex/delete_spec.rb
fedex-3.10.1 spec/lib/fedex/delete_spec.rb
fedex-3.10.0 spec/lib/fedex/delete_spec.rb
fedex-3.9.1 spec/lib/fedex/delete_spec.rb
fedex-3.9.0 spec/lib/fedex/delete_spec.rb
fedex-3.8.0 spec/lib/fedex/delete_spec.rb