1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
#
# Don't require content type on PUT, POST and PATCH requests
# in the test case. Instead allow testing of how the WSGI app handles
# it.
#
# https://github.com/cdent/gabbi/issues/16
#
# This had been done initially to try to enforce some accuracy
# in the created tests, but real-world use has shown we need to
# be able to create tests that demonstrate that a server is behaving
# poorly (and not requiring a content-type).
#
tests:
- name: put no content-type
desc: P methods should 400 when no content-type
url: /
data: '"moo"'
method: PUT
status: 400
- name: post no content-type
desc: P methods should 400 when no content-type
url: /
data: '"moo"'
method: POST
status: 400
- name: patch no content-type
desc: P methods should 400 when no content-type
url: /
data: '"moo"'
method: PATCH
status: 400
- name: put content-type
desc: P methods should 400 when no content-type
url: /
data: '"moo"'
request_headers:
content-type: application/json
method: PUT
- name: post content-type
desc: P methods should 400 when no content-type
url: /
data: '"moo"'
request_headers:
content-type: application/json
method: POST
- name: patch content-type
desc: P methods should 400 when no content-type
url: /
data: '"moo"'
request_headers:
content-type: application/json
method: PATCH
|