Last active
December 27, 2017 12:42
-
-
Save cored/add042a65b8b68b7c25ed46b13024586 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
describe "#cancel_slot" do | |
let(:courier_slot) do | |
instance_double("CourierSlot", external_api_identifier: "api_identifier") | |
end | |
let(:cancel_slot) do | |
instance_double("EasyPost::Carriers::CancelSlot", ez_shipment: ez_shipment) | |
end | |
let(:ez_shipment) do | |
instance_double("EasyPost::Carriers::CancelSlot") | |
end | |
before do | |
allow(EasyPost::Carriers::CancelSlot).to receive(:call) { cancel_slot } | |
end | |
it "delegates the carrier cancelation slot" do | |
described_class.new.cancel_slot(courier_slot) | |
expect(EasyPost::Carriers::CancelSlot).to have_received(:call) | |
.with("api_identifier") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment