accountAuthorization.spec.jsx 808 B

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