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

Add setFlows test.

This commit is contained in:
Mark Hindess 2014-07-14 22:00:09 +01:00
parent fe9ff0a297
commit 8e32427109

View File

@ -97,4 +97,22 @@ describe('flows', function() {
});
});
describe('#setFlows',function() {
it('should save and start an empty tab flow',function(done) {
var saved = 0;
var testFlows = [{"type":"tab","id":"tab1","label":"Sheet 1"}];
var storage = {
saveFlows: function(conf) {
var defer = when.defer();
defer.resolve();
should.deepEqual(testFlows, conf);
return defer.promise;
}
};
RED.init({}, storage);
flows.setFlows(testFlows);
events.once('nodes-started', function() { done(); });
});
});
});