projectSecurityHeaders.spec.jsx 917 B

1234567891011121314151617181920212223242526272829303132
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import ProjectSecurityHeaders from 'sentry/views/settings/projectSecurityHeaders';
  3. describe('ProjectSecurityHeaders', function () {
  4. const org = TestStubs.Organization();
  5. const project = TestStubs.Project();
  6. const url = `/projects/${org.slug}/${project.slug}/`;
  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 = render(
  17. <ProjectSecurityHeaders
  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.container).toSnapshot();
  27. });
  28. });