MM-19990 Prevent glimpse of the app if TOS not accepted (#3617)

This commit is contained in:
Elias Nahum 2019-11-30 14:12:08 -03:00 committed by GitHub
parent a3c7b4707e
commit 46efa88bb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View file

@ -19,7 +19,7 @@ import StatusBar from 'app/components/status_bar';
import {getMarkdownTextStyles, getMarkdownBlockStyles} from 'app/utils/markdown';
import {makeStyleSheetFromTheme, setNavigatorStyles} from 'app/utils/theme';
import {dismissModal, dismissAllModals, setButtons} from 'app/actions/navigation';
import {dismissModal, setButtons} from 'app/actions/navigation';
export default class TermsOfService extends PureComponent {
static propTypes = {
@ -118,7 +118,6 @@ export default class TermsOfService extends PureComponent {
closeTermsAndLogout = async () => {
const {actions} = this.props;
await dismissAllModals();
actions.logout();
};

View file

@ -121,8 +121,6 @@ describe('TermsOfService', () => {
});
test('should call dismissAllModals on closeTermsAndLogout', () => {
const dismissAllModals = jest.spyOn(NavigationActions, 'dismissAllModals');
const wrapper = shallow(
<TermsOfService {...baseProps}/>,
{context: {intl: {formatMessage: jest.fn()}}},
@ -130,6 +128,6 @@ describe('TermsOfService', () => {
wrapper.setState({loading: false, termsId: 1, termsText: 'Terms Text'});
wrapper.instance().closeTermsAndLogout();
expect(dismissAllModals).toHaveBeenCalledTimes(1);
expect(baseProps.actions.logout).toHaveBeenCalledTimes(1);
});
});