Skip to content

Instantly share code, notes, and snippets.

@cored
Last active January 11, 2018 14:10
Show Gist options
  • Save cored/3e38faec315b03d77e06f6380b2fc054 to your computer and use it in GitHub Desktop.
Save cored/3e38faec315b03d77e06f6380b2fc054 to your computer and use it in GitHub Desktop.
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