Sha256: 1eafe79a98914043a7088235bd763fe2e56eeebbdd968098cf7eac328eb75774

Contents?: true

Size: 1.5 KB

Versions: 6

Compression:

Stored size: 1.5 KB

Contents

require "spec_helper"

describe ShippingEasy::Resources::RateQuote do
  describe ".fetch" do
    it "sends a request with the expected options" do

      ShippingEasy::Resources::RateQuote.should_receive(:execute_request!).with({:relative_path=>"/rate_quote",
                                                              :http_method=>:post,
                                                              :payload => {:carrier => "usps", 
                                                                          :carrier_service => "Priority",
                                                                          :packaging => 'custome',
                                                                          :weight => "7",
                                                                          :to_postal_code => "78717",
                                                                          :from_postal_code => "78746"
                                                              }}, :partner)

      ShippingEasy::Resources::RateQuote.fetch(payload: {:carrier => 'usps',
                                                 :carrier_service => "Priority",
                                                 :packaging => 'custome',
                                                 :weight => "7",
                                                 :to_postal_code => "78717",
                                                 :from_postal_code => "78746"}
                                                )
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shipping_easy-0.7.1 spec/resources/rate_request_spec.rb
shipping_easy-0.7.0 spec/resources/rate_request_spec.rb
shipping_easy-0.6.1 spec/resources/rate_request_spec.rb
shipping_easy-0.6.0 spec/resources/rate_request_spec.rb
shipping_easy-0.5.1 spec/resources/rate_request_spec.rb
shipping_easy-0.5.0 spec/resources/rate_request_spec.rb