index.spec.tsx 1.2 KB

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