From c43374a553c28459be4cac116a72a4f34dddba72 Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Wed, 20 Mar 2019 20:26:48 -0500 Subject: Clear notices when setCompletedOnboarding is called --- test/unit/ui/app/actions.spec.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/unit/ui') diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.spec.js index 8d7de8b02..d27521088 100644 --- a/test/unit/ui/app/actions.spec.js +++ b/test/unit/ui/app/actions.spec.js @@ -1308,6 +1308,30 @@ describe('Actions', () => { }) }) + describe.only('#setCompletedOnboarding', () => { + let markAllNoticesReadSpy, completeOnboardingSpy + + beforeEach(() => { + markAllNoticesReadSpy = sinon.stub(background, 'markAllNoticesRead') + completeOnboardingSpy = sinon.stub(background, 'completeOnboarding') + }) + + after(() => { + markAllNoticesReadSpy.restore() + completeOnboardingSpy.restore() + }) + + it('', (done) => { + const store = mockStore() + store.dispatch(actions.setCompletedOnboarding()) + .then(() => { + assert.equal(markAllNoticesReadSpy.callCount, 1) + assert.equal(completeOnboardingSpy.callCount, 1) + }) + done() + }) + }) + describe('#updateNetworkNonce', () => { let getTransactionCountSpy -- cgit