expectCt.spec.tsx 889 B

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