From dfb06fe2e56af6db2e7f21a681833c7ab51d7eb7 Mon Sep 17 00:00:00 2001 From: Beth Date: Fri, 16 Jan 2015 18:11:46 +1100 Subject: [PATCH] Fixed https://github.com/bethesque/pact-mock_service/issues/9 It should actually be upper case, but we need to fix https://github.com/bethesque/pact-support/issues/3 first --- dist/pact-consumer-js-dsl.js | 4 ++-- src/interaction.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/pact-consumer-js-dsl.js b/dist/pact-consumer-js-dsl.js index e606dbb..738ebb3 100644 --- a/dist/pact-consumer-js-dsl.js +++ b/dist/pact-consumer-js-dsl.js @@ -45,13 +45,13 @@ Pact.Interaction = Pact.Interaction || {}; withRequest: function(firstParameter, path, headers, body) { if (typeof(firstParameter) === 'object') { - this.request.method = firstParameter.method; + this.request.method = firstParameter.method.toLowerCase(); this.request.path = firstParameter.path; this.request.query = firstParameter.query; this.request.headers = firstParameter.headers; this.request.body = firstParameter.body; } else { - this.request.method = firstParameter; + this.request.method = firstParameter.toLowerCase(); this.request.path = path; this.request.headers = headers; this.request.body = body; diff --git a/src/interaction.js b/src/interaction.js index 7695ef8..b1e7c7c 100644 --- a/src/interaction.js +++ b/src/interaction.js @@ -24,13 +24,13 @@ Pact.Interaction = Pact.Interaction || {}; withRequest: function(firstParameter, path, headers, body) { if (typeof(firstParameter) === 'object') { - this.request.method = firstParameter.method; + this.request.method = firstParameter.method.toLowerCase(); this.request.path = firstParameter.path; this.request.query = firstParameter.query; this.request.headers = firstParameter.headers; this.request.body = firstParameter.body; } else { - this.request.method = firstParameter; + this.request.method = firstParameter.toLowerCase(); this.request.path = path; this.request.headers = headers; this.request.body = body;