Skip to content

Instantly share code, notes, and snippets.

@bryanl
Created March 28, 2011 22:54
Show Gist options
  • Save bryanl/891486 to your computer and use it in GitHub Desktop.
Save bryanl/891486 to your computer and use it in GitHub Desktop.
it 'should add an error if the claim cannot be saved' do
checkout = Checkout::Base.new(:user => user, :offers => {offer.id => 3}, :root_offer_id => offer.id)
Claim.should_receive(:issue).with(offer, checkout, 3).and_return(claim)
claim.should_receive(:save).and_return(false)
Checkout::Steps::HandleClaimStep.new(checkout).check_holds
checkout.errors.length.should == 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment