Skip to content

Commit b211960

Browse files
committed
constructor
Signed-off-by: Fabio José <[email protected]>
1 parent cb33a8a commit b211960

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/http_binding_0_1.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const source = "urn:event:from:myapi/resourse/123";
77
const webhook = "https://cloudevents.io/webhook";
88
const contentType = "application/cloudevents+json; charset=utf-8";
99

10+
const HTTPBinding = Cloudevent.bindings["http-structured0.1"];
11+
1012
var cloudevent = new Cloudevent()
1113
.type(type)
1214
.source(source);
@@ -16,8 +18,7 @@ var httpcfg = {
1618
url : webhook + "/json"
1719
};
1820

19-
var httpstructured01 =
20-
new Cloudevent.bindings["http-structured0.1"](httpcfg);
21+
var httpstructured01 = new HTTPBinding(httpcfg);
2122

2223
describe("HTTP Transport Binding - Version 0.1", () => {
2324
beforeEach(() => {

0 commit comments

Comments
 (0)