mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix inject test to use a proper type
This commit is contained in:
parent
c7bcd3f438
commit
633a6a0ee6
@ -23,7 +23,7 @@ describe('inject node', function() {
|
|||||||
before(function(done) {
|
before(function(done) {
|
||||||
helper.startServer(done);
|
helper.startServer(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(function() {
|
afterEach(function() {
|
||||||
helper.unload();
|
helper.unload();
|
||||||
});
|
});
|
||||||
@ -87,13 +87,13 @@ describe('inject node', function() {
|
|||||||
it('should inject message', function(done) {
|
it('should inject message', function(done) {
|
||||||
helper.load(injectNode,
|
helper.load(injectNode,
|
||||||
[{id:"n1", type:"inject",
|
[{id:"n1", type:"inject",
|
||||||
payloadType:"some type", topic: "t4",
|
payloadType:"str", topic: "t4",payload:"hello",
|
||||||
wires:[["n4"]] },
|
wires:[["n4"]] },
|
||||||
{ id:"n4", type:"helper"}], function() {
|
{ id:"n4", type:"helper"}], function() {
|
||||||
var n4 = helper.getNode("n4");
|
var n4 = helper.getNode("n4");
|
||||||
n4.on("input", function(msg) {
|
n4.on("input", function(msg) {
|
||||||
msg.should.have.property('topic', 't4');
|
msg.should.have.property('topic', 't4');
|
||||||
msg.should.have.property('payload', '');
|
msg.should.have.property('payload', 'hello');
|
||||||
helper.clearFlows().then(function() {
|
helper.clearFlows().then(function() {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user