Added missing 'source' getter on Spec02
Signed-off-by: Michele Angioni <michele.angioni@takeaway.com>
This commit is contained in:
parent
2cc5999704
commit
41710130f1
|
@ -59,6 +59,10 @@ Spec02.prototype.source = function(_source){
|
|||
return this;
|
||||
};
|
||||
|
||||
Spec02.prototype.getSource = function() {
|
||||
return this.payload["source"];
|
||||
};
|
||||
|
||||
Spec02.prototype.id = function(_id){
|
||||
this.payload["id"] = _id;
|
||||
return this;
|
||||
|
|
|
@ -15,6 +15,19 @@ var cloudevent = new Cloudevent()
|
|||
|
||||
describe("CloudEvents Spec 0.1 - JavaScript SDK", () => {
|
||||
|
||||
describe("Object properties", () => {
|
||||
|
||||
describe("Attribute getters", () => {
|
||||
it("returns 'type'", () => {
|
||||
expect(cloudevent.getType()).to.equal(type);
|
||||
});
|
||||
|
||||
it("returns 'source'", () => {
|
||||
expect(cloudevent.getSource()).to.equal(source);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("JSON Format", () => {
|
||||
|
||||
describe("Required context attributes", () => {
|
||||
|
|
|
@ -16,6 +16,19 @@ var cloudevent =
|
|||
|
||||
describe("CloudEvents Spec 0.2 - JavaScript SDK", () => {
|
||||
|
||||
describe("Object properties", () => {
|
||||
|
||||
describe("Attribute getters", () => {
|
||||
it("returns 'type'", () => {
|
||||
expect(cloudevent.getType()).to.equal(type);
|
||||
});
|
||||
|
||||
it("returns 'source'", () => {
|
||||
expect(cloudevent.getSource()).to.equal(source);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("JSON Format", () => {
|
||||
|
||||
describe("Required context attributes", () => {
|
||||
|
|
Loading…
Reference in New Issue