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-01-14 18:10:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-14 18:10:46 +0300
commit8106ac487c3b52471e2ca894c65c13162c2fb1a8 (patch)
tree12a07c7dd794babe870477f3cd42f15392a82355 /spec/frontend/lib
parent18873553de98259d0558157f78198b38ddd02b31 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/lib')
-rw-r--r--spec/frontend/lib/utils/users_cache_spec.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/frontend/lib/utils/users_cache_spec.js b/spec/frontend/lib/utils/users_cache_spec.js
index bc00a5d5409..4034f39ee9c 100644
--- a/spec/frontend/lib/utils/users_cache_spec.js
+++ b/spec/frontend/lib/utils/users_cache_spec.js
@@ -1,4 +1,4 @@
-import Api from '~/api';
+import * as UserApi from '~/api/user_api';
import UsersCache from '~/lib/utils/users_cache';
describe('UsersCache', () => {
@@ -88,7 +88,9 @@ describe('UsersCache', () => {
let apiSpy;
beforeEach(() => {
- jest.spyOn(Api, 'users').mockImplementation((query, options) => apiSpy(query, options));
+ jest
+ .spyOn(UserApi, 'getUsers')
+ .mockImplementation((query, options) => apiSpy(query, options));
});
it('stores and returns data from API call if cache is empty', (done) => {
@@ -151,7 +153,7 @@ describe('UsersCache', () => {
let apiSpy;
beforeEach(() => {
- jest.spyOn(Api, 'user').mockImplementation((id) => apiSpy(id));
+ jest.spyOn(UserApi, 'getUser').mockImplementation((id) => apiSpy(id));
});
it('stores and returns data from API call if cache is empty', (done) => {
@@ -208,7 +210,7 @@ describe('UsersCache', () => {
let apiSpy;
beforeEach(() => {
- jest.spyOn(Api, 'userStatus').mockImplementation((id) => apiSpy(id));
+ jest.spyOn(UserApi, 'getUserStatus').mockImplementation((id) => apiSpy(id));
});
it('stores and returns data from API call if cache is empty', (done) => {