1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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)
This commit is contained in:
Dave Conway-Jones 2015-09-02 12:40:39 +01:00 committed by Nick O'Leary
parent c1d694a97c
commit cc6e0937a0
2 changed files with 3 additions and 2 deletions

View File

@ -737,6 +737,7 @@ Flow.prototype.handleStatus = function(node,statusMessage) {
}
var message = {
status: {
text: "",
source: {
id: node.id,
type: node.type,

View File

@ -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",