From cc6e0937a08d1c892d7d5e503b63c3f39e388606 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 2 Sep 2015 12:40:39 +0100 Subject: [PATCH] initialise status.text to be blank string if not set. (and change test to use .text rather than .message) (not that it matters at this level of test) --- red/nodes/Flow.js | 1 + test/nodes/core/core/25-status_spec.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/red/nodes/Flow.js b/red/nodes/Flow.js index 54a8c5684..2e3607a47 100644 --- a/red/nodes/Flow.js +++ b/red/nodes/Flow.js @@ -737,6 +737,7 @@ Flow.prototype.handleStatus = function(node,statusMessage) { } var message = { status: { + text: "", source: { id: node.id, type: node.type, diff --git a/test/nodes/core/core/25-status_spec.js b/test/nodes/core/core/25-status_spec.js index d28c1603a..fa5636ba1 100644 --- a/test/nodes/core/core/25-status_spec.js +++ b/test/nodes/core/core/25-status_spec.js @@ -32,7 +32,7 @@ describe('status Node', function() { var n2 = helper.getNode("n2"); n1.should.have.property('name', 'status'); n2.on("input", function(msg) { - msg.message.should.equal("Oh dear"); + msg.text.should.equal("Oh dear"); msg.should.have.property('source'); msg.source.should.have.property('id',"12345"); msg.source.should.have.property('type',"testnode"); @@ -40,7 +40,7 @@ describe('status Node', function() { done(); }); var mst = { - message: "Oh dear", + text: "Oh dear", source: { id: "12345", type: "testnode",