summaryrefslogtreecommitdiff
path: root/web-ui/src/account_recovery/backup_account_step/backup_account_step.spec.js
blob: 38a5e56059751aaf1ef896f1fb0f702d28fde790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { shallow } from 'enzyme';
import expect from 'expect';
import React from 'react';
import LinkButton from 'src/common/link_button/link_button';
import { BackupAccountStep } from './backup_account_step';

describe('BackupAccountStep', () => {
  let backupAccountStep;

  beforeEach(() => {
    const mockTranslations = key => key;
    backupAccountStep = shallow(<BackupAccountStep t={mockTranslations} />);
  });

  it('renders title for backup account step', () => {
    expect(backupAccountStep.find('h1').text()).toEqual('account-recovery.backup-account-step.title');
  });

  it('renders submit button with given href', () => {
    expect(backupAccountStep.find(LinkButton).props().href).toEqual('/backup-account');
  });

  it('renders submit button with given button text', () => {
    expect(backupAccountStep.find(LinkButton).props().buttonText)
      .toEqual('account-recovery.backup-account-step.buttonText');
  });
});