Adding tests when coming from login page.

This commit is contained in:
elweyn 2022-01-17 16:38:56 +01:00
parent 749244a9f8
commit 0b023eb797

View File

@ -88,4 +88,22 @@ describe('Thx', () => {
expect(wrapper.find('a.btn').attributes('href')).toBe('/overview')
})
})
describe('coming from /login', () => {
beforeEach(() => {
wrapper = Wrapper(createMockObject('login'))
})
it('renders the thanks text', () => {
expect(wrapper.find('p.h4').text()).toBe('site.thx.activateEmail')
})
it('renders the thanks redirect button', () => {
expect(wrapper.find('a.btn').text()).toBe('login')
})
it('links the redirect button to /login', () => {
expect(wrapper.find('a.btn').attributes('href')).toBe('/login')
})
})
})