hpkp.spec.tsx 841 B

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