Enabling and disabling non-existent nodes throws an error

This commit is contained in:
Anna Thomas
2014-11-27 16:42:45 +00:00
parent ec43fc4fe2
commit 57bc83b2a7
2 changed files with 11 additions and 9 deletions

View File

@@ -991,14 +991,14 @@ describe('NodeRegistry', function() {
});
it('fails to enable/disable non-existent nodes', function(done) {
typeRegistry.init(settings);
typeRegistry.init(settingsWithStorage);
typeRegistry.load("wontexist",true).then(function() {
var list = typeRegistry.getNodeList();
list.should.be.an.Array.and.be.empty;
/*jshint immed: false */
(function() {
typeRegistry.disableNode("123");
typeRegistry.disableNode("123");
}).should.throw();
/*jshint immed: false */