simplify validation blocks and use correct scope

This commit is contained in:
domaindrivendev
2017-07-21 22:26:14 -07:00
parent 7f0e437f8b
commit 732cab994c
6 changed files with 10 additions and 31 deletions

View File

@@ -22,7 +22,9 @@ describe 'Blogs API', type: :request, swagger_doc: 'v1/swagger.json' do
schema '$ref' => '#/definitions/errors_object'
let(:blog) { { title: 'foo' } }
run_test!
run_test! do |response|
expect(response.body).to include("can't be blank")
end
end
end
@@ -37,7 +39,6 @@ describe 'Blogs API', type: :request, swagger_doc: 'v1/swagger.json' do
response '200', 'success' do
schema type: 'array', items: { '$ref' => '#/definitions/blog' }
run_test!
end
response '406', 'unsupported accept header' do

View File

@@ -82,15 +82,6 @@
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/blog"
}
}
},
"406": {
"description": "unsupported accept header"
}