adminQuotas.spec.tsx 799 B

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