Skip to content

Commit 50c876f

Browse files
committed
fix: ensure configured webhook headers are used when making request
1 parent 692d04e commit 50c876f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/pact_broker/webhooks/webhook_request_template.rb

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def build(context)
3131
attributes = {
3232
method: http_method,
3333
url: build_url(context[:pact], context[:verification]),
34+
headers: headers,
3435
username: username,
3536
password: password,
3637
uuid: uuid,

spec/lib/pact_broker/webhooks/webhook_request_template_spec.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module Webhooks
1010
username: "foo",
1111
password: "bar",
1212
uuid: "1234",
13-
body: body
13+
body: body,
14+
headers: {'Foo' => 'bar'}
1415
}
1516
end
1617

@@ -21,7 +22,8 @@ module Webhooks
2122
username: "foo",
2223
password: "bar",
2324
uuid: "1234",
24-
body: built_body
25+
body: built_body,
26+
headers: {'Foo' => 'bar'}
2527
}
2628
end
2729

0 commit comments

Comments
 (0)