grafana/public/app/features/teams/state/selectors.test.ts
Ieva d3f69fd34a
Chore: legacy access control cleanup for frontend team pages (#75005)
* clean up legacy access control code for teams

* remove editorsCanAdmin config from the frontend

* add editorsCanAdmin config option back for the frontend
2023-10-09 10:32:44 +01:00

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);
});
});
});