File tree
2 files changed
+4
-1
lines changed- src/transport/http
- test/integration
2 files changed
+4
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
| 23 | + | |
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
|
Lines changed: 3 additions & 0 deletions
<
8000
table aria-label="Diff for: test/integration/http_emitter_test.ts" class="tab-size width-full DiffLines-module__tableLayoutFixed--ZmaVx" data-diff-anchor="diff-d56010d92145fb9149442a98ac84b7608e983ef6f2ad64c3f9a68fda370ff505" data-tab-size="8" data-paste-markdown-skip="true" role="grid" style="--line-number-cell-width:40px;--line-number-cell-width-unified:80px">Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import nock from "nock";
4
4
import CONSTANTS from "../../src/constants";
5
5
6
6
const DEFAULT_CE_CONTENT_TYPE = CONSTANTS.DEFAULT_CE_CONTENT_TYPE;
7
+const DEFAULT_CONTENT_TYPE = CONSTANTS.DEFAULT_CONTENT_TYPE;
7
8
8
9
import { CloudEvent, Version, Emitter, Protocol, headersFor } from "../../src";
9
10
import { AxiosResponse } from "axios";
@@ -55,6 +56,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
55
56
.send(event)
56
57
.then((response: AxiosResponse) => {
57
58
// A binary message will have a ce-id header
59
+ expect(response.data["content-type"]).to.equal(DEFAULT_CONTENT_TYPE);
58
60
expect(response.data[CONSTANTS.CE_HEADERS.ID]).to.equal(event.id);
59
61
expect(response.data[CONSTANTS.CE_HEADERS.SPEC_VERSION]).to.equal(Version.V1);
60
62
// A binary message will have a request body for the data
@@ -82,6 +84,7 @@ describe("HTTP Transport Binding Emitter for CloudEvents", () => {
82
84
.then((response: { data: { [k: string]: string } }) => {
83
85
// A binary message will have a ce-id header
84
86
expect(response.data.customheader).to.equal("value");
87
+ expect(response.data["content-type"]).to.equal(DEFAULT_CONTENT_TYPE);
85
88
expect(response.data[CONSTANTS.CE_HEADERS.ID]).to.equal(event.id);
86
89
expect(response.data[CONSTANTS.CE_HEADERS.SPEC_VERSION]).to.equal(Version.V1);
87
90
// A binary message will have a request body for the data
0 commit comments