|
|
@ -40,7 +40,7 @@ describe('notice-controller', function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
describe('#markAllNoticesRead', () => { |
|
|
|
describe('#markAllNoticesRead', () => { |
|
|
|
it('marks all notices read', (done) => { |
|
|
|
it('marks all notices read', async () => { |
|
|
|
const testList = [{ |
|
|
|
const testList = [{ |
|
|
|
id: 0, |
|
|
|
id: 0, |
|
|
|
read: false, |
|
|
|
read: false, |
|
|
@ -57,11 +57,10 @@ describe('notice-controller', function () { |
|
|
|
|
|
|
|
|
|
|
|
noticeController.setNoticesList(testList) |
|
|
|
noticeController.setNoticesList(testList) |
|
|
|
|
|
|
|
|
|
|
|
noticeController.markAllNoticesRead() |
|
|
|
await noticeController.markAllNoticesRead() |
|
|
|
|
|
|
|
|
|
|
|
const unreadNotices = noticeController.getUnreadNotices() |
|
|
|
const unreadNotices = noticeController.getUnreadNotices() |
|
|
|
assert.equal(unreadNotices.length, 0) |
|
|
|
assert.equal(unreadNotices.length, 0) |
|
|
|
done() |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|