diff --git a/test/node_flows_spec.js b/test/node_flows_spec.js index 634b7ac54..c0283e5e5 100644 --- a/test/node_flows_spec.js +++ b/test/node_flows_spec.js @@ -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(); }); + }); + }); + });