adminQuotas.spec.jsx 805 B

12345678910111213141516171819202122232425262728293031
  1. import {mountWithTheme} from 'sentry-test/enzyme';
  2. import {Client} from 'app/api';
  3. import AdminQuotas from 'app/views/admin/adminQuotas';
  4. // TODO(dcramer): this doesnt really test anything as we need to
  5. // mock the API Response/wait on it
  6. describe('AdminQuotas', function () {
  7. describe('render()', function () {
  8. beforeEach(() => {
  9. Client.addMockResponse({
  10. url: '/internal/quotas/',
  11. body: {
  12. options: {
  13. 'system.rate-limit': 0,
  14. },
  15. backend: 'sentry.quotas.redis.RedisQuota',
  16. },
  17. });
  18. });
  19. it('renders', function () {
  20. const wrapper = mountWithTheme(<AdminQuotas params={{}} />, {
  21. context: {
  22. router: TestStubs.router(),
  23. },
  24. });
  25. expect(wrapper).toSnapshot();
  26. });
  27. });
  28. });