From 50c876f61faf35baaab7c96f976393ce28d6e15e Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 25 Jun 2018 22:26:43 +1000 Subject: [PATCH] fix: ensure configured webhook headers are used when making request --- lib/pact_broker/webhooks/webhook_request_template.rb | 1 + .../pact_broker/webhooks/webhook_request_template_spec.rb | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/pact_broker/webhooks/webhook_request_template.rb b/lib/pact_broker/webhooks/webhook_request_template.rb index d63fd76d4..a0e344d73 100644 --- a/lib/pact_broker/webhooks/webhook_request_template.rb +++ b/lib/pact_broker/webhooks/webhook_request_template.rb @@ -31,6 +31,7 @@ def build(context) attributes = { method: http_method, url: build_url(context[:pact], context[:verification]), + headers: headers, username: username, password: password, uuid: uuid, diff --git a/spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb b/spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb index 589738689..bbf18d128 100644 --- a/spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb +++ b/spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb @@ -10,7 +10,8 @@ module Webhooks username: "foo", password: "bar", uuid: "1234", - body: body + body: body, + headers: {'Foo' => 'bar'} } end @@ -21,7 +22,8 @@ module Webhooks username: "foo", password: "bar", uuid: "1234", - body: built_body + body: built_body, + headers: {'Foo' => 'bar'} } end