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>2020-07-16 06:09:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-16 06:09:12 +0300
commit5de7e7c72a59f8a99c71ec33948a53a64f73d075 (patch)
tree89d4b61572ff3d479232378c34e0eaa63246aa27 /spec/frontend/issuable_suggestions
parentb0da29fca999ca9e042d99b556a7a69b7812dcfd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issuable_suggestions')
-rw-r--r--spec/frontend/issuable_suggestions/components/item_spec.js5
-rw-r--r--spec/frontend/issuable_suggestions/mock_data.js8
2 files changed, 8 insertions, 5 deletions
diff --git a/spec/frontend/issuable_suggestions/components/item_spec.js b/spec/frontend/issuable_suggestions/components/item_spec.js
index 6c3c30fcbb0..36799f4ee9f 100644
--- a/spec/frontend/issuable_suggestions/components/item_spec.js
+++ b/spec/frontend/issuable_suggestions/components/item_spec.js
@@ -4,6 +4,7 @@ import Icon from '~/vue_shared/components/icon.vue';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import Suggestion from '~/issuable_suggestions/components/item.vue';
import mockData from '../mock_data';
+import { TEST_HOST } from 'jest/helpers/test_constants';
describe('Issuable suggestions suggestion component', () => {
let vm;
@@ -34,7 +35,7 @@ describe('Issuable suggestions suggestion component', () => {
const link = vm.find(GlLink);
- expect(link.attributes('href')).toBe(`${gl.TEST_HOST}/test/issue/1`);
+ expect(link.attributes('href')).toBe(`${TEST_HOST}/test/issue/1`);
});
it('renders IID', () => {
@@ -100,7 +101,7 @@ describe('Issuable suggestions suggestion component', () => {
const image = vm.find(UserAvatarImage);
- expect(image.props('imgSrc')).toBe(`${gl.TEST_HOST}/avatar`);
+ expect(image.props('imgSrc')).toBe(`${TEST_HOST}/avatar`);
});
});
diff --git a/spec/frontend/issuable_suggestions/mock_data.js b/spec/frontend/issuable_suggestions/mock_data.js
index 4f0f9ef8d62..4ce35ad5196 100644
--- a/spec/frontend/issuable_suggestions/mock_data.js
+++ b/spec/frontend/issuable_suggestions/mock_data.js
@@ -1,3 +1,5 @@
+import { TEST_HOST } from 'jest/helpers/test_constants';
+
function getDate(daysMinus) {
const today = new Date();
today.setDate(today.getDate() - daysMinus);
@@ -15,12 +17,12 @@ export default () => ({
createdAt: getDate(3),
updatedAt: getDate(2),
confidential: false,
- webUrl: `${gl.TEST_HOST}/test/issue/1`,
+ webUrl: `${TEST_HOST}/test/issue/1`,
title: 'Test issue',
author: {
- avatarUrl: `${gl.TEST_HOST}/avatar`,
+ avatarUrl: `${TEST_HOST}/avatar`,
name: 'Author Name',
username: 'author.username',
- webUrl: `${gl.TEST_HOST}/author`,
+ webUrl: `${TEST_HOST}/author`,
},
});