diff --git a/test/index.spec.js b/test/index.spec.js index d1d40b0..b540b5a 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -49,7 +49,7 @@ const EXPECTED_RESPONSES_MULTI_LANG = readFileSync('./test/resources/output/Resp const EXPECTED_AUTH_REQUEST = readFileSync('./test/resources/output/AuthRequest.yml', 'utf8') const EXPECTED_RESPONSES_NO_HEADERS = readFileSync('./test/resources/output/ResponsesNoHeaders.yml', 'utf8') const EXPECTED_FORM_DATA = readFileSync('./test/resources/output/FormData.yml', 'utf8') -const EXPECTED_WWW_FORM_URLENCODED = readFileSync('./test/resources/output/WwwFormUrlencoded.yml', 'utf8') +const EXPECTED_FORM_URLENCODED = readFileSync('./test/resources/output/FormUrlencoded.yml', 'utf8') const AUTH_DEFINITIONS = { myCustomAuth: { @@ -105,7 +105,7 @@ describe('Library specs', function () { const COLLECTION_RESPONSES_MULTI_LANG = `./test/resources/input/${version}/ResponsesMultiLang.json` const COLLECTION_AUTH_REQUEST = `./test/resources/input/${version}/AuthRequest.json` const COLLECTION_FORM_DATA = `./test/resources/input/${version}/FormData.json` - const COLLECTION_WWW_FORM_URLENCODED = `./test/resources/input/${version}/WwwFormUrlencoded.json` + const COLLECTION_FORM_URLENCODED = `./test/resources/input/${version}/FormUrlencoded.json` it('should work with a basic transform', async function () { const result = await postmanToOpenApi(COLLECTION_BASIC, OUTPUT_PATH, {}) @@ -406,8 +406,8 @@ describe('Library specs', function () { }) it('should parse POST methods with www form urlencoded', async function () { - const result = await postmanToOpenApi(COLLECTION_WWW_FORM_URLENCODED, OUTPUT_PATH, {}) - equal(result, EXPECTED_WWW_FORM_URLENCODED) + const result = await postmanToOpenApi(COLLECTION_FORM_URLENCODED, OUTPUT_PATH, {}) + equal(result, EXPECTED_FORM_URLENCODED) }) }) }) diff --git a/test/resources/input/v2/WwwFormUrlencoded.json b/test/resources/input/v2/FormUrlencoded.json similarity index 90% rename from test/resources/input/v2/WwwFormUrlencoded.json rename to test/resources/input/v2/FormUrlencoded.json index 53ee6da..e199615 100644 --- a/test/resources/input/v2/WwwFormUrlencoded.json +++ b/test/resources/input/v2/FormUrlencoded.json @@ -1,7 +1,7 @@ { "info": { - "_postman_id": "1eaa74c4-2d76-45f0-bd34-bff5d96f0ba8", - "name": "Form Data", + "_postman_id": "c7890cb4-aa39-4569-9701-a9d6f4abc750", + "name": "Form Url Encoded", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ @@ -38,4 +38,4 @@ "response": [] } ] -} +} \ No newline at end of file diff --git a/test/resources/input/v21/WwwFormUrlencoded.json b/test/resources/input/v21/FormUrlencoded.json similarity index 91% rename from test/resources/input/v21/WwwFormUrlencoded.json rename to test/resources/input/v21/FormUrlencoded.json index faff9dc..d0cc333 100644 --- a/test/resources/input/v21/WwwFormUrlencoded.json +++ b/test/resources/input/v21/FormUrlencoded.json @@ -1,7 +1,7 @@ { "info": { - "_postman_id": "1eaa74c4-2d76-45f0-bd34-bff5d96f0ba8", - "name": "Form Data", + "_postman_id": "c7890cb4-aa39-4569-9701-a9d6f4abc750", + "name": "Form Url Encoded", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ @@ -48,4 +48,4 @@ "response": [] } ] -} +} \ No newline at end of file diff --git a/test/resources/output/WwwFormUrlencoded.yml b/test/resources/output/FormUrlencoded.yml similarity index 97% rename from test/resources/output/WwwFormUrlencoded.yml rename to test/resources/output/FormUrlencoded.yml index e2d5656..6e1d141 100644 --- a/test/resources/output/WwwFormUrlencoded.yml +++ b/test/resources/output/FormUrlencoded.yml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - title: Form Data + title: Form Url Encoded version: 1.0.0 servers: - url: https://api.io