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:
parent
fe9ff0a297
commit
8e32427109
@ -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(); });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user