From 772ca2f34fba52d8afa60bc0fc2cf76e0f74348c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Fri, 2 Aug 2019 11:07:09 -0300 Subject: [PATCH] Example for testing the binary headers values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- test/http_binding_0_3.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/http_binding_0_3.js b/test/http_binding_0_3.js index 5c23132..6cb4af6 100644 --- a/test/http_binding_0_3.js +++ b/test/http_binding_0_3.js @@ -188,6 +188,14 @@ describe("HTTP Transport Binding - Version 0.3", () => { }); }); + it("should 'ce-subject' have the right value", () => { + return binary.emit(cloudevent) + .then((response) => { + expect(cloudevent.getSubject()) + .to.equal(response.config.headers["ce-subject"]); + }); + }); + describe("'data' attribute with 'base64' encoding", () => { it("HTTP Header contains 'ce-datacontentencoding'", () => { return binary.emit(cebase64)