daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Sep 24th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. resource "Order" do
  2.   let(:client) { RspecApiDocumentation::TestClient.new(self, :headers => { "HTTP_ACCEPT" => "application/json", "CONTENT_TYPE" => "application/json" }) }
  3.  
  4.   post "/orders" do
  5.     parameter :name, "Order name"
  6.  
  7.     let(:name) { "New order" }
  8.  
  9.     let(:raw_post) { params.to_json }
  10.  
  11.     example "Sending JSON" do
  12.       do_request
  13.  
  14.       response_body.should be_json_eql({ :name => name }.to_json)
  15.       status.should == 201
  16.     end
  17.   end
  18. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top