projectExpectCtReports.spec.jsx 929 B

1234567891011121314151617181920212223242526272829303132
  1. import {mountWithTheme} from 'sentry-test/enzyme';
  2. import ProjectExpectCtReports from 'sentry/views/settings/projectSecurityHeaders/expectCt';
  3. describe('ProjectExpectCtReports', function () {
  4. const org = TestStubs.Organization();
  5. const project = TestStubs.Project();
  6. const url = `/projects/${org.slug}/${project.slug}/expect-ct/`;
  7. beforeEach(function () {
  8. MockApiClient.clearMockResponses();
  9. MockApiClient.addMockResponse({
  10. url: `/projects/${org.slug}/${project.slug}/keys/`,
  11. method: 'GET',
  12. body: [],
  13. });
  14. });
  15. it('renders', function () {
  16. const wrapper = mountWithTheme(
  17. <ProjectExpectCtReports
  18. organization={org}
  19. project={project}
  20. {...TestStubs.routerProps({
  21. params: {orgId: org.slug, projectId: project.slug},
  22. location: TestStubs.location({pathname: url}),
  23. })}
  24. />
  25. );
  26. expect(wrapper).toSnapshot();
  27. });
  28. });