forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
655 B
27 lines
655 B
import client from './client';
|
|
import * as setup from './setup';
|
|
|
|
describe('GET /api/search', () => {
|
|
const state = {};
|
|
|
|
beforeAll(async () => {
|
|
state = await setup.ensureState({
|
|
orgName: 'api-test-org',
|
|
users: [{ user: setup.admin, role: 'Admin' }],
|
|
admin: setup.admin,
|
|
dashboards: [
|
|
{
|
|
title: 'Dashboard in root no permissions',
|
|
uid: 'AAA',
|
|
},
|
|
],
|
|
});
|
|
});
|
|
|
|
describe('With admin user', () => {
|
|
it('should return all dashboards', async () => {
|
|
let rsp = await client.callAs(state.admin).get('/api/search');
|
|
expect(rsp.data).toHaveLength(1);
|
|
});
|
|
});
|
|
});
|
|
|