index.spec.jsx 1008 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import {Client} from 'sentry/api';
  3. import OrganizationRepositoriesContainer from 'sentry/views/settings/organizationRepositories';
  4. describe('OrganizationRepositoriesContainer', function () {
  5. const context = TestStubs.routerContext();
  6. const organization = TestStubs.Organization();
  7. beforeEach(function () {
  8. Client.clearMockResponses();
  9. });
  10. describe('without any providers', function () {
  11. beforeEach(function () {
  12. Client.addMockResponse({
  13. url: '/organizations/org-slug/repos/',
  14. body: [],
  15. });
  16. Client.addMockResponse({
  17. url: '/organizations/org-slug/config/repos/',
  18. body: {providers: []},
  19. });
  20. });
  21. it('is loading when initially rendering', function () {
  22. const wrapper = render(
  23. <OrganizationRepositoriesContainer organization={organization} />,
  24. {
  25. context,
  26. }
  27. );
  28. expect(wrapper.container).toSnapshot();
  29. });
  30. });
  31. });