urls.spec.jsx 629 B

12345678910111213
  1. import {getDiscoverLandingUrl} from 'sentry/utils/discover/urls';
  2. describe('getDiscoverLandingUrl', function () {
  3. it('is correct for with discover-query and discover-basic features', function () {
  4. const org = TestStubs.Organization({features: ['discover-query', 'discover-basic']});
  5. expect(getDiscoverLandingUrl(org)).toBe('/organizations/org-slug/discover/queries/');
  6. });
  7. it('is correct for with only discover-basic feature', function () {
  8. const org = TestStubs.Organization({features: ['discover-basic']});
  9. expect(getDiscoverLandingUrl(org)).toBe('/organizations/org-slug/discover/results/');
  10. });
  11. });