organizationRepositoriesContainer.spec.jsx 960 B

1234567891011121314151617181920212223242526272829303132333435
  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. beforeEach(function () {
  7. Client.clearMockResponses();
  8. });
  9. describe('without any providers', function () {
  10. beforeEach(function () {
  11. Client.addMockResponse({
  12. url: '/organizations/org-slug/repos/',
  13. body: [],
  14. });
  15. Client.addMockResponse({
  16. url: '/organizations/org-slug/config/repos/',
  17. body: {providers: []},
  18. });
  19. });
  20. it('is loading when initially rendering', function () {
  21. const wrapper = render(
  22. <OrganizationRepositoriesContainer params={{orgId: 'org-slug'}} />,
  23. {
  24. context,
  25. }
  26. );
  27. expect(wrapper.container).toSnapshot();
  28. });
  29. });
  30. });