accountAuthorization.spec.jsx 854 B

1234567891011121314151617181920212223242526272829303132333435
  1. import * as PropTypes from 'prop-types';
  2. import {render} from 'sentry-test/reactTestingLibrary';
  3. import {Client} from 'sentry/api';
  4. import AccountAuthorizations from 'sentry/views/settings/account/accountAuthorizations';
  5. describe('AccountAuthorizations', function () {
  6. beforeEach(function () {
  7. Client.clearMockResponses();
  8. });
  9. it('renders empty', function () {
  10. Client.addMockResponse({
  11. url: '/api-authorizations/',
  12. method: 'GET',
  13. body: [],
  14. });
  15. const wrapper = render(<AccountAuthorizations />, {
  16. context: {
  17. context: {
  18. location: TestStubs.location(),
  19. router: TestStubs.router(),
  20. },
  21. childContextTypes: {
  22. location: PropTypes.object,
  23. router: PropTypes.object,
  24. },
  25. },
  26. });
  27. expect(wrapper.container).toSnapshot();
  28. });
  29. });