Sha256: ca1378389df393b831851b23dcafa314b2e6b91207c7fe9c876da67e5bc60dd0

Contents?: true

Size: 1.11 KB

Versions: 6

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'
require 'fedex/shipment'

describe Fedex::Request::Pickup do
  describe "pickup service" do
    let(:fedex) { Fedex::Shipment.new(fedex_production_credentials) }
    let(:pickup_location) do
      {:name => "Sender", :company => "Company", :phone_number => "555-555-5555 ", :address => "Main Street",
       :city => "Mumbai", :state => "MH", :postal_code => "400012", :country_code => "IN"}
    end
    let(:packages) do
      {:weight => {:units => "LB", :value => 2}, :count => 2}
    end
    let(:ready_timestamp) { DateTime.now + 1 }
    let(:close_time) { DateTime.now + 1.2 }

    context "alternate address", :vcr do
      let(:options) do
        {:carrier_code => "FDXE", :packages => packages, :ready_timestamp => ready_timestamp,
         :close_time => close_time, :pickup_location => pickup_location, :remarks => 'TEST. DO NOT PICKUP', :commodity_description => 'Ladies Item as per invoice',
         :country_relationship => 'DOMESTIC'
       }
      end

      it "succeeds" do
        expect {
          @pickup = fedex.pickup(options)
        }.to_not raise_error
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

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