Last active
January 11, 2018 14:10
-
-
Save cored/3e38faec315b03d77e06f6380b2fc054 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "easypost" | |
require_relative "../../../../app/services/easy_post/carriers/cancel_slot" | |
describe EasyPost::Carriers::CancelSlot do | |
subject(:cancel_slot) { described_class.new } | |
before do | |
EasyPost.api_key = "API_KEY" | |
end | |
let(:api_identifier) do | |
"identifier" | |
end | |
describe "#call" do | |
context "when easy post returns a successful response", :vcr do | |
it "retrieves an easy post shipment from their API" do | |
expect( | |
cancel_slot.call(api_identifier).ez_shipment.refund_status | |
).to eq "refunded" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment