Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-24 03:07:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-24 03:07:35 +0300
commit1d78b1f77add7a986a5be4b71dc03ff2bbe0d8b7 (patch)
treee0075b71b8c2af58bf6dafc2973b8370a4583551 /spec/frontend/search
parent87e9d9675af5df4c703c502b79567baea24f5395 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/search')
-rw-r--r--spec/frontend/search/store/actions_spec.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/frontend/search/store/actions_spec.js b/spec/frontend/search/store/actions_spec.js
index 9519aba165b..bb711b3af81 100644
--- a/spec/frontend/search/store/actions_spec.js
+++ b/spec/frontend/search/store/actions_spec.js
@@ -56,6 +56,19 @@ describe('Global Search Store Actions', () => {
});
});
+ describe('getGroupsData', () => {
+ const mockCommit = () => {};
+ beforeEach(() => {
+ jest.spyOn(Api, 'groups').mockResolvedValue(MOCK_GROUPS);
+ });
+
+ it('calls Api.groups with order_by set to similarity', () => {
+ actions.fetchGroups({ commit: mockCommit }, 'test');
+
+ expect(Api.groups).toHaveBeenCalledWith('test', { order_by: 'similarity' });
+ });
+ });
+
describe('getProjectsData', () => {
const mockCommit = () => {};
beforeEach(() => {