Open
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Allow to pass metadata to example_request
  • Loading branch information
@artofhuman
artofhuman committedJul 23, 2021
commit 582baa84fd59ad9f234060868043da8ec8716002
Original file line numberDiff line numberDiff line change
Expand Up@@ -528,8 +528,8 @@ resource "Account" do
expect(status).to eq 404
end

# With example_request, you can't change the :document
example_request "Get a list on page 3", :page => 3 do
# With example_request, you can change the :document via metadata
example_request "Get a list on page 3", :page => 3, :metadata => {:document => false} do
expect(status).to eq 404
end
end
Expand DownExpand Up@@ -658,6 +658,13 @@ resource "Orders" do
end
```

For passing metadata to example_request you can use param named `:metadata`
```ruby
example_request "Creating an order", :name => "Other name", metadata: {document: :private} do
# make assertions
end
```

#### explanation

This method takes a string representing a detailed explanation of the example.
Expand Down