Remove receiver tests

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-06-11 21:51:06 -03:00
parent dd5f694dab
commit 0db21da02a
1 changed files with 0 additions and 107 deletions

View File

@ -177,113 +177,6 @@ describe("HTTP Transport Binding - Version 0.2", () => {
});
describe("Binary", () => {
describe("Check", () => {
it("Throw error when payload arg is null or undefined", () => {
// setup
var payload = null;
var attributes = {};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("payload is null or undefined");
});
it("Throw error when attributes arg is null or undefined", () => {
// setup
var payload = {};
var attributes = null;
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("attributes is null or undefined");
});
it("Throw error when payload is not an object", () => {
// setup
var payload = "wow";
var attributes = {};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("payload must be an object");
});
it("Throw error when headers has no 'ce-type'", () => {
// setup
var payload = {};
var attributes = {
"ce-specversion" : "specversion",
"ce-source" : "source",
"ce-id" : "id"
};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("header 'ce-type' not found");
});
it("Throw error when headers has no 'ce-specversion'", () => {
// setup
var payload = {};
var attributes = {
"ce-type" : "type",
"ce-source" : "source",
"ce-id" : "id"
};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("header 'ce-specversion' not found");
});
it("Throw error when headers has no 'ce-source'", () => {
// setup
var payload = {};
var attributes = {
"ce-type" : "type",
"ce-specversion" : "specversion",
"ce-id" : "id"
};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("header 'ce-source' not found");
});
it("Throw error when headers has no 'ce-id'", () => {
// setup
var payload = {};
var attributes = {
"ce-type" : "type",
"ce-specversion" : "specversion",
"ce-source" : "source"
};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.throw("header 'ce-id' not found");
});
it("No error when all required headers are in place", () => {
// setup
var payload = {};
var attributes = {
"ce-type" : "type",
"ce-specversion" : "specversion",
"ce-source" : "source",
"ce-id" : "id"
};
// act and assert
expect(httpbinary02.check.bind(httpbinary02, payload, attributes))
.to.not.throw();
});
});
describe("Parse", () => {
});
describe("JSON Format", () => {
it("requires '" + cloudevent.getContenttype() + "' Content-Type in the header", () => {
return httpbinary02.emit(cloudevent)