accountAuthorization.spec.jsx 800 B

123456789101112131415161718192021222324252627282930313233
  1. import PropTypes from 'prop-types';
  2. import {mountWithTheme} from 'sentry-test/enzyme';
  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 = mountWithTheme(<AccountAuthorizations />, {
  16. context: {
  17. location: TestStubs.location(),
  18. router: TestStubs.router(),
  19. },
  20. childContextTypes: {
  21. location: PropTypes.object,
  22. router: PropTypes.object,
  23. },
  24. });
  25. expect(wrapper).toSnapshot();
  26. });
  27. });