Sha256: 0ec602d5f642819a87e8e148dc3df4fece62d59d9478d29a414cef166421e996

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

require 'spec_helper'
require 'fedex_ship/shipment'

describe FedexShip::Request::Pickup do
  describe "pickup service" do
    let(:fedex) { FedexShip::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

1 entries across 1 versions & 1 rubygems

Version Path
fedex_ship-0.1.0 spec/lib/fedex_ship/pickup_spec.rb