From b2363198c2f805ffd3074306aac3ea7959d8cfaa Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 13 Oct 2021 16:47:37 +0200 Subject: [PATCH] router.test.js fix SendOverview --- frontend/src/routes/router.test.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/router.test.js b/frontend/src/routes/router.test.js index 5e2e16005..433707131 100644 --- a/frontend/src/routes/router.test.js +++ b/frontend/src/routes/router.test.js @@ -56,7 +56,7 @@ describe('router', () => { }) it('has twelve routes defined', () => { - expect(routes).toHaveLength(12) + expect(routes).toHaveLength(13) }) describe('overview', () => { @@ -70,6 +70,17 @@ describe('router', () => { }) }) + describe('send', () => { + it('requires authorization', () => { + expect(routes.find((r) => r.path === '/send').meta.requiresAuth).toBeTruthy() + }) + + it('loads the "Send" component', async () => { + const component = await routes.find((r) => r.path === '/send').component() + expect(component.default.name).toBe('SendOverview') + }) + }) + describe('profile', () => { it('requires authorization', () => { expect(routes.find((r) => r.path === '/profile').meta.requiresAuth).toBeTruthy()