aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/ui/app/actions.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/ui/app/actions.spec.js')
-rw-r--r--test/unit/ui/app/actions.spec.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.spec.js
index 46e94bb32..a578ec89c 100644
--- a/test/unit/ui/app/actions.spec.js
+++ b/test/unit/ui/app/actions.spec.js
@@ -1308,6 +1308,29 @@ describe('Actions', () => {
})
})
+ describe('#setCompletedOnboarding', () => {
+ let markAllNoticesReadSpy, completeOnboardingSpy
+
+ beforeEach(() => {
+ markAllNoticesReadSpy = sinon.stub(background, 'markAllNoticesRead')
+ markAllNoticesReadSpy.callsFake(cb => cb())
+ completeOnboardingSpy = sinon.stub(background, 'completeOnboarding')
+ completeOnboardingSpy.callsFake(cb => cb())
+ })
+
+ after(() => {
+ markAllNoticesReadSpy.restore()
+ completeOnboardingSpy.restore()
+ })
+
+ it('completing onboarding marks all notices as read', async () => {
+ const store = mockStore()
+ await store.dispatch(actions.setCompletedOnboarding())
+ assert.equal(markAllNoticesReadSpy.callCount, 1)
+ assert.equal(completeOnboardingSpy.callCount, 1)
+ })
+ })
+
describe('#updateNetworkNonce', () => {
let getTransactionCountSpy