From 1b3922c770b12b82aebbe79e0f73f3c04df04c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Wed, 14 Nov 2018 21:36:18 -0200 Subject: [PATCH] assert the request payload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- test/http_binding_0_1.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/http_binding_0_1.js b/test/http_binding_0_1.js index fdbf0cf..4b34965 100644 --- a/test/http_binding_0_1.js +++ b/test/http_binding_0_1.js @@ -36,6 +36,14 @@ describe("HTTP Transport Binding - Version 0.1", () => { .to.equal(contentType); }); }); + + it("the request should be correct", () => { + return httpstructured_0_1.emit(cloudevent) + .then(response => { + expect(JSON.parse(response.config.data)) + .to.deep.equal(cloudevent.format()); + }); + }); }); }); });