@@ -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