camel case
Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
parent
409be307cb
commit
88076edc07
|
@ -9,7 +9,7 @@ const contenttype = "application/json";
|
||||||
const data = {};
|
const data = {};
|
||||||
const extensions = {};
|
const extensions = {};
|
||||||
|
|
||||||
var cloudevent = new Cloudevent(Cloudevent.specs['0.2'])
|
var cloudevent = new Cloudevent(Cloudevent.specs["0.2"])
|
||||||
.type(type)
|
.type(type)
|
||||||
.source(source);
|
.source(source);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ var httpcfg = {
|
||||||
url : webhook + "/json"
|
url : webhook + "/json"
|
||||||
};
|
};
|
||||||
|
|
||||||
var httpstructured_0_1 =
|
var httpstructured01 =
|
||||||
new Cloudevent.bindings["http-structured0.1"](httpcfg);
|
new Cloudevent.bindings["http-structured0.1"](httpcfg);
|
||||||
|
|
||||||
describe("HTTP Transport Binding - Version 0.1", () => {
|
describe("HTTP Transport Binding - Version 0.1", () => {
|
||||||
|
@ -30,7 +30,7 @@ describe("HTTP Transport Binding - Version 0.1", () => {
|
||||||
describe("Structured", () => {
|
describe("Structured", () => {
|
||||||
describe("JSON Format", () => {
|
describe("JSON Format", () => {
|
||||||
it("requires '" + contentType + "' Content-Type in header", () => {
|
it("requires '" + contentType + "' Content-Type in header", () => {
|
||||||
return httpstructured_0_1.emit(cloudevent)
|
return httpstructured01.emit(cloudevent)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
expect(response.config.headers["Content-Type"])
|
expect(response.config.headers["Content-Type"])
|
||||||
.to.equal(contentType);
|
.to.equal(contentType);
|
||||||
|
@ -38,7 +38,7 @@ describe("HTTP Transport Binding - Version 0.1", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("the request should be correct", () => {
|
it("the request should be correct", () => {
|
||||||
return httpstructured_0_1.emit(cloudevent)
|
return httpstructured01.emit(cloudevent)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
expect(JSON.parse(response.config.data))
|
expect(JSON.parse(response.config.data))
|
||||||
.to.deep.equal(cloudevent.format());
|
.to.deep.equal(cloudevent.format());
|
||||||
|
|
Loading…
Reference in New Issue