debian-mirror-gitlab/spec/frontend/users_select/utils_spec.js

23 lines
524 B
JavaScript
Raw Normal View History

2023-01-13 00:05:48 +05:30
import { getAjaxUsersSelectParams } from '~/users_select/utils';
2020-05-24 23:13:21 +05:30
const options = {
fooBar: 'baz',
activeUserId: 1,
};
describe('getAjaxUsersSelectParams', () => {
it('returns query parameters built from provided options', () => {
expect(
getAjaxUsersSelectParams(options, {
foo_bar: 'fooBar',
active_user_id: 'activeUserId',
non_existent_key: 'nonExistentKey',
}),
).toEqual({
foo_bar: 'baz',
active_user_id: 1,
non_existent_key: null,
});
});
});