{"size": 629, "ext": "js", "max_stars_repo_path": "web-client/src/presenter/actions/navigateToFilePetitionSuccessAction.test.js", "max_stars_repo_name": "codyseibert/ef-cms", "max_stars_repo_stars_event_min_datetime": "2018-09-16T17:05:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-28T15:30:54.000Z", "max_issues_repo_path": "web-client/src/presenter/actions/navigateToFilePetitionSuccessAction.test.js", "max_issues_repo_name": "codyseibert/ef-cms", "max_issues_repo_issues_event_min_datetime": "2018-10-10T18:39:26.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:30:12.000Z", "max_forks_repo_path": "web-client/src/presenter/actions/navigateToFilePetitionSuccessAction.test.js", "max_forks_repo_name": "codyseibert/ef-cms", "max_forks_repo_forks_event_min_datetime": "2018-10-09T21:02:23.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-22T10:09:37.000Z"}
{"max_stars_count": 52, "max_issues_count": 2108, "max_forks_count": 23, "avg_line_length": 24.1923076923, "max_line_length": 92, "alphanum_fraction": 0.6629570747}
import { navigateToFilePetitionSuccessAction } from './navigateToFilePetitionSuccessAction';
import { presenter } from '../presenter-mock';
import { runAction } from 'cerebral/test';

describe('navigateToFilePetitionSuccessAction', () => {
  let routeStub;

  beforeAll(() => {
    routeStub = jest.fn();

    presenter.providers.router = {
      route: routeStub,
    };
  });

  it('navigates to FilePetitionSuccess', async () => {
    await runAction(navigateToFilePetitionSuccessAction, {
      modules: {
        presenter,
      },
    });

    expect(routeStub).toHaveBeenCalledWith('/file-a-petition/success');
  });
});
