feat(api): allow redirects with a returnTo param (#40161)
This commit is contained in:
committed by
GitHub
parent
8fd00afd9c
commit
b2e2f33cf1
@@ -1,7 +1,7 @@
|
||||
/* global jest, expect */
|
||||
import React from 'react';
|
||||
import ShallowRenderer from 'react-test-renderer/shallow';
|
||||
import { apiLocation } from '../../config/env.json';
|
||||
import { apiLocation, homeLocation } from '../../config/env.json';
|
||||
|
||||
import { ShowSettings } from './ShowSettings';
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('<ShowSettings />', () => {
|
||||
shallow.render(<ShowSettings {...loggedOutProps} />);
|
||||
expect(navigate).toHaveBeenCalledTimes(1);
|
||||
expect(navigate).toHaveBeenCalledWith(
|
||||
`${apiLocation}/signin?returnTo=settings`
|
||||
`${apiLocation}/signin?returnTo=${homeLocation}/settings`
|
||||
);
|
||||
const result = shallow.getRenderOutput();
|
||||
// Renders Loader rather than ShowSettings
|
||||
|
Reference in New Issue
Block a user