index.spec.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import {Organization} from 'sentry-fixture/organization';
  2. import {render} from 'sentry-test/reactTestingLibrary';
  3. import OrganizationRepositoriesContainer from 'sentry/views/settings/organizationRepositories';
  4. describe('OrganizationRepositoriesContainer', function () {
  5. const context = TestStubs.routerContext();
  6. const organization = Organization();
  7. const router = TestStubs.router();
  8. beforeEach(function () {
  9. MockApiClient.clearMockResponses();
  10. });
  11. describe('without any providers', function () {
  12. beforeEach(function () {
  13. MockApiClient.addMockResponse({
  14. url: '/organizations/org-slug/repos/',
  15. body: [],
  16. });
  17. MockApiClient.addMockResponse({
  18. url: '/organizations/org-slug/config/repos/',
  19. body: {providers: []},
  20. });
  21. });
  22. it('is loading when initially rendering', function () {
  23. render(
  24. <OrganizationRepositoriesContainer
  25. router={router}
  26. routes={router.routes}
  27. params={router.params}
  28. routeParams={router.params}
  29. route={router.routes[0]}
  30. location={router.location}
  31. organization={organization}
  32. />,
  33. {
  34. context,
  35. }
  36. );
  37. });
  38. });
  39. });