diff --git a/examples/payload/data-0.json b/examples/payload/data-0.json index 91e844d..c0119ee 100644 --- a/examples/payload/data-0.json +++ b/examples/payload/data-0.json @@ -1,5 +1,3 @@ { - "data":{ - "much":"wow" - } + "much":"wow" } diff --git a/test/bindings/http/receiver_binary_0_2_tests.js b/test/bindings/http/receiver_binary_0_2_tests.js index ed2b149..1323cba 100644 --- a/test/bindings/http/receiver_binary_0_2_tests.js +++ b/test/bindings/http/receiver_binary_0_2_tests.js @@ -27,14 +27,14 @@ describe("HTTP Transport Binding Binary Receiver for CloudEvents v0.2", () => { .to.throw("attributes is null or undefined"); }); - it("Throw error when payload is not an object", () => { + it("Throw error when payload is not an object or string", () => { // setup - var payload = "wow"; + var payload = 1.2; var attributes = {}; // act and assert expect(receiver.check.bind(receiver, payload, attributes)) - .to.throw("payload must be an object"); + .to.throw("payload must be an object or a string"); }); it("Throw error when headers has no 'ce-type'", () => {