adminQuotas.spec.jsx 839 B

1234567891011121314151617181920212223242526272829303132
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import {Client} from 'sentry/api';
  3. import AdminQuotas from 'sentry/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. MockApiClient.addMockResponse({
  21. url: '/internal/stats/',
  22. body: [],
  23. });
  24. const wrapper = render(<AdminQuotas params={{}} />);
  25. expect(wrapper.container).toSnapshot();
  26. });
  27. });
  28. });