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

Restore stubs in credentials_spec

This commit is contained in:
Nick O'Leary 2014-08-01 21:56:27 +01:00
parent 8e8e13a3a2
commit 8ee5be7031

View File

@ -64,6 +64,7 @@ describe('Credentials', function() {
credentials.add('b',{"d":3}); credentials.add('b',{"d":3});
storage.saveCredentials.callCount.should.be.exactly(1); storage.saveCredentials.callCount.should.be.exactly(1);
credentials.get("b").should.have.property('d',3); credentials.get("b").should.have.property('d',3);
storage.saveCredentials.restore();
done(); done();
}); });
}); });
@ -86,6 +87,7 @@ describe('Credentials', function() {
credentials.delete('a'); credentials.delete('a');
storage.saveCredentials.callCount.should.be.exactly(1); storage.saveCredentials.callCount.should.be.exactly(1);
should.not.exist(credentials.get("a")); should.not.exist(credentials.get("a"));
storage.saveCredentials.restore();
done(); done();
}); });
@ -111,6 +113,7 @@ describe('Credentials', function() {
}); });
storage.saveCredentials.callCount.should.be.exactly(1); storage.saveCredentials.callCount.should.be.exactly(1);
should.not.exist(credentials.get("a")); should.not.exist(credentials.get("a"));
storage.saveCredentials.restore();
done(); done();
}); });
}); });
@ -201,7 +204,6 @@ describe('Credentials', function() {
var fs = require('fs-extra'); var fs = require('fs-extra');
var http = require('http'); var http = require('http');
var express = require('express'); var express = require('express');
var sinon = require('sinon');
var server = require("../../../red/server"); var server = require("../../../red/server");
var localfilesystem = require("../../../red/storage/localfilesystem"); var localfilesystem = require("../../../red/storage/localfilesystem");
var app = express(); var app = express();
@ -356,7 +358,6 @@ describe('Credentials', function() {
var fs = require('fs-extra'); var fs = require('fs-extra');
var http = require('http'); var http = require('http');
var express = require('express'); var express = require('express');
var sinon = require('sinon');
var request = require('supertest'); var request = require('supertest');
var server = require("../../../red/server"); var server = require("../../../red/server");