Commit 9f8873df authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'sabrams-master-patch-19512' into 'master'

Update API development docs with testing section

See merge request gitlab-org/gitlab!26082
parents 70c4bb26 6fa907d1
......@@ -118,3 +118,11 @@ different components are making use of.
[Entity]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/entities.rb
[validation, and coercion of the parameters]: https://github.com/ruby-grape/grape#parameter-validation-and-coercion
[installing GitLab under a relative URL]: https://docs.gitlab.com/ee/install/relative_url.html
## Testing
When writing tests for new API endpoints, consider using a schema [fixture](./testing_guide/best_practices.md#fixtures) located in `/spec/fixtures/api/schemas`. You can `expect` a response to match a given schema:
```ruby
expect(response).to match_response_schema('merge_requests')
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment