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:
parent
167e1ead2e
commit
ec20b58c82
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,10 @@ const sinon = require('sinon');
|
||||||
const brute = require('../../../../../server/web/shared/middlewares/brute');
|
const brute = require('../../../../../server/web/shared/middlewares/brute');
|
||||||
|
|
||||||
describe('brute middleware', function () {
|
describe('brute middleware', function () {
|
||||||
|
after(function () {
|
||||||
|
sinon.restore();
|
||||||
|
});
|
||||||
|
|
||||||
it('exports a contentApiKey method', function () {
|
it('exports a contentApiKey method', function () {
|
||||||
should.equal(typeof brute.contentApiKey, 'function');
|
should.equal(typeof brute.contentApiKey, 'function');
|
||||||
});
|
});
|
||||||
|
@ -20,7 +24,6 @@ describe('brute middleware', function () {
|
||||||
// I don't care
|
// I don't care
|
||||||
} finally {
|
} finally {
|
||||||
should.equal(contentApiKeyStub.called, true);
|
should.equal(contentApiKeyStub.called, true);
|
||||||
contentApiKeyStub.reset();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue