Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- resource "Order" do
- let(:client) { RspecApiDocumentation::TestClient.new(self, :headers => { "HTTP_ACCEPT" => "application/json", "CONTENT_TYPE" => "application/json" }) }
- post "/orders" do
- parameter :name, "Order name"
- let(:name) { "New order" }
- let(:raw_post) { params.to_json }
- example "Sending JSON" do
- do_request
- response_body.should be_json_eql({ :name => name }.to_json)
- status.should == 201
- end
- end
- end
Add Comment
Please, Sign In to add comment