mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* clean up legacy access control code for teams * remove editorsCanAdmin config from the frontend * add editorsCanAdmin config option back for the frontend
23 lines
553 B
TypeScript
23 lines
553 B
TypeScript
import { TeamState } from '../../../types';
|
|
import { getMockTeam } from '../__mocks__/teamMocks';
|
|
|
|
import { getTeam } from './selectors';
|
|
|
|
describe('Team selectors', () => {
|
|
describe('Get team', () => {
|
|
const mockTeam = getMockTeam();
|
|
|
|
it('should return team if matching with location team', () => {
|
|
const mockState: TeamState = {
|
|
team: mockTeam,
|
|
searchMemberQuery: '',
|
|
members: [],
|
|
groups: [],
|
|
};
|
|
|
|
const team = getTeam(mockState, '1');
|
|
expect(team).toEqual(mockTeam);
|
|
});
|
|
});
|
|
});
|