You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
explanation "Orders are top-level business objects. They can be created by a POST request"
381
+
post "/orders"do
382
+
example "Creating an order"do
383
+
explanation "This method creates a new order."
384
+
do_request
385
+
# make assertions
386
+
end
387
+
end
388
+
end
389
+
```
390
+
391
+
372
392
#### header
373
393
374
394
This method takes the header name and value. The value can be a string or a symbol. If it is a symbol it will `send` the symbol, allowing you to `let` header values.
@@ -396,8 +416,12 @@ Special values:
396
416
397
417
*`:required => true` Will display a red '*' to show it's required
398
418
*`:scope => :the_scope` Will scope parameters in the hash, scoping can be nested. See example
419
+
*`:method => :method_name` Will use specified method as a parameter value
399
420
400
-
The value of scoped parameters can be set with both scoped (`let(:order_item_item_id)`) and unscoped (`let(:item_id)`) methods. It always searches for the scoped method first and falls back to the unscoped method.
421
+
Retrieving of parameter value goes through several steps:
422
+
1. if `method` option is defined and test case responds to this method then this method is used;
423
+
2. if test case responds to scoped method then this method is used;
0 commit comments