adminQuotas.spec.jsx 781 B

12345678910111213141516171819202122232425262728
  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.warnOnMissingMocks();
  21. const wrapper = render(<AdminQuotas params={{}} />);
  22. expect(wrapper.container).toSnapshot();
  23. });
  24. });
  25. });