0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Fixed spam prevention test being affected by order

- locally the spam prevention test failed, only when run in a group
- seems to be due to order and the way sinon reset works
- this fixes it locally for me
This commit is contained in:
Hannah Wolfe 2019-08-06 10:04:00 +01:00
parent 167e1ead2e
commit ec20b58c82

View file

@ -3,6 +3,10 @@ const sinon = require('sinon');
const brute = require('../../../../../server/web/shared/middlewares/brute');
describe('brute middleware', function () {
after(function () {
sinon.restore();
});
it('exports a contentApiKey method', function () {
should.equal(typeof brute.contentApiKey, 'function');
});
@ -20,7 +24,6 @@ describe('brute middleware', function () {
// I don't care
} finally {
should.equal(contentApiKeyStub.called, true);
contentApiKeyStub.reset();
}
});
});