forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_users.test.js
27 lines (23 loc) · 1006 Bytes
/
get_users.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {getFilterOptions} from './get_users';
describe('get_users', () => {
describe('getFilterOptions', () => {
it('should return empty options in case of empty filter', () => {
const filters = getFilterOptions('');
expect(filters).toEqual({});
});
it('should return empty options in case of undefined', () => {
const filters = getFilterOptions(undefined);
expect(filters).toEqual({});
});
it('should return role options in case of system_admin', () => {
const filters = getFilterOptions('system_admin');
expect(filters).toEqual({role: 'system_admin'});
});
it('should return empty options in case of inactive', () => {
const filters = getFilterOptions('inactive');
expect(filters).toEqual({inactive: true});
});
});
});