diff --git a/tests/fixtures/meta/set_http_headers_response.metadata.json b/tests/fixtures/meta/set_http_headers_response.metadata.json new file mode 100644 index 0000000..d6c82a3 --- /dev/null +++ b/tests/fixtures/meta/set_http_headers_response.metadata.json @@ -0,0 +1,5 @@ +{ + "success_code": "302", + "error_code": "500", + "http_headers": true +} \ No newline at end of file diff --git a/tests/fixtures/meta/set_http_headers_response.schema.json b/tests/fixtures/meta/set_http_headers_response.schema.json new file mode 100644 index 0000000..05f2d71 --- /dev/null +++ b/tests/fixtures/meta/set_http_headers_response.schema.json @@ -0,0 +1,8 @@ +{ + "type:": "object", + "properties": { + "http_headers": { + "type": "object" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/meta/set_http_headers_response.zen b/tests/fixtures/meta/set_http_headers_response.zen new file mode 100644 index 0000000..66d3e6a --- /dev/null +++ b/tests/fixtures/meta/set_http_headers_response.zen @@ -0,0 +1,9 @@ +Given I have a 'string dictionary' named 'http_headers' + +When I set 'location' to 'https://example.com/cb?code=aaaa' as 'string' +When I create the 'string dictionary' named 'response' + +When I move 'location' in 'response' +When I move 'response' in 'http headers' + +Then print the 'http_headers' \ No newline at end of file diff --git a/tests/workflow.stepci.yml b/tests/workflow.stepci.yml index f993f2f..964144f 100644 --- a/tests/workflow.stepci.yml +++ b/tests/workflow.stepci.yml @@ -70,6 +70,15 @@ tests: http_headers: response: Cache-Control: no-store + - name: set http_headers response + http: + url: http://${{env.host}}/meta/set_http_headers_response + method: GET + followRedirects: false + check: + headers: + Location: https://example.com/cb?code=aaaa + status: 302 hello: steps: