index.spec.tsx 718 B

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