accountAuthorizations.spec.tsx 976 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {LocationFixture} from 'sentry-fixture/locationFixture';
  2. import {RouterContextFixture} from 'sentry-fixture/routerContextFixture';
  3. import {RouterFixture} from 'sentry-fixture/routerFixture';
  4. import {render} from 'sentry-test/reactTestingLibrary';
  5. import AccountAuthorizations from 'sentry/views/settings/account/accountAuthorizations';
  6. describe('AccountAuthorizations', function () {
  7. beforeEach(function () {
  8. MockApiClient.clearMockResponses();
  9. });
  10. it('renders empty', function () {
  11. MockApiClient.addMockResponse({
  12. url: '/api-authorizations/',
  13. method: 'GET',
  14. body: [],
  15. });
  16. const router = RouterFixture({});
  17. render(
  18. <AccountAuthorizations
  19. location={LocationFixture()}
  20. routeParams={router.params}
  21. params={router.params}
  22. routes={router.routes}
  23. route={router.routes[0]}
  24. router={router}
  25. />,
  26. {
  27. context: RouterContextFixture(),
  28. }
  29. );
  30. });
  31. });