mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
🐛 tests: integration test for api notifications failed sometimes
no issue - sometimes the integration test for api notifications failed - this was caused because multiple tests are using the notifications API, which has a local notification store - we need to ensure that tests, who add notifications to this store, reset the store after it's test iteration
This commit is contained in:
parent
f4f562b6db
commit
a1cb8e8c58
@ -13,6 +13,10 @@ describe('Notifications API', function () {
|
||||
|
||||
should.exist(NotificationsAPI);
|
||||
|
||||
after(function () {
|
||||
return NotificationsAPI.destroyAll(testUtils.context.internal);
|
||||
});
|
||||
|
||||
it('can add, adds defaults (internal)', function (done) {
|
||||
var msg = {
|
||||
type: 'info',
|
||||
|
@ -1,14 +1,18 @@
|
||||
var _ = require('lodash'),
|
||||
testUtils = require('../utils'),
|
||||
should = require('should'),
|
||||
rewire = require('rewire'),
|
||||
uuid = require('uuid'),
|
||||
testUtils = require('../utils'),
|
||||
configUtils = require('../utils/configUtils'),
|
||||
packageInfo = require('../../../package'),
|
||||
updateCheck = rewire('../../server/update-check'),
|
||||
NotificationsAPI = require('../../server/api/notifications');
|
||||
|
||||
describe('Update Check', function () {
|
||||
after(function () {
|
||||
return NotificationsAPI.destroyAll(testUtils.context.internal);
|
||||
});
|
||||
|
||||
describe('Reporting to UpdateCheck', function () {
|
||||
before(function () {
|
||||
configUtils.set('privacy:useUpdateCheck', true);
|
||||
@ -40,6 +44,7 @@ describe('Update Check', function () {
|
||||
data.post_count.should.be.above(0);
|
||||
data.npm_version.should.be.a.String();
|
||||
data.npm_version.should.not.be.empty();
|
||||
data.lts.should.eql(false);
|
||||
|
||||
done();
|
||||
}).catch(done);
|
||||
|
Loading…
Reference in New Issue
Block a user