Skip to content

Instantly share code, notes, and snippets.

@arturdent
Created November 28, 2012 13:34
Show Gist options
  • Save arturdent/4161322 to your computer and use it in GitHub Desktop.
Save arturdent/4161322 to your computer and use it in GitHub Desktop.
requests/payments_spec.rb
xit "approves payment" do
payment = Payment.last
payment.update_attribute :signature_method, 'sms'
payment.update_attribute :signature, '123456'
post "/payments/#{payment.id}/approve.json"
response.code.should == "422"
post "/payments/#{payment.id}/approve.json", :payment => {
:signature => payment.signature
}
response.code.should == "200"
Payment.last.state.should == "approved"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment