Skip to content

Commit 365e087

Browse files
committed
Fix binary data attribute example
Signed-off-by: Fabio José <[email protected]>
1 parent fea87aa commit 365e087

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

examples/payload/data-0.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"data":{
3-
"much":"wow"
4-
}
2+
"much":"wow"
53
}

test/bindings/http/receiver_binary_0_2_tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ describe("HTTP Transport Binding Binary Receiver for CloudEvents v0.2", () => {
2727
.to.throw("attributes is null or undefined");
2828
});
2929

30-
it("Throw error when payload is not an object", () => {
30+
it("Throw error when payload is not an object or string", () => {
3131
// setup
32-
var payload = "wow";
32+
var payload = 1.2;
3333
var attributes = {};
3434

3535
// act and assert
3636
expect(receiver.check.bind(receiver, payload, attributes))
37-
.to.throw("payload must be an object");
37+
.to.throw("payload must be an object or a string");
3838
});
3939

4040
it("Throw error when headers has no 'ce-type'", () => {

0 commit comments

Comments
 (0)