diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
commit | 143f196f8b3c40ceb7e9335a8dcc712b079519b9 (patch) | |
tree | 909df13e1f99b456287934741ba466b506e01129 /spec/frontend/repository | |
parent | 575ccb036ea14c6a899482a83bd985ffbc992077 (diff) | |
download | gitlab-ce-143f196f8b3c40ceb7e9335a8dcc712b079519b9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/repository')
-rw-r--r-- | spec/frontend/repository/components/table/index_spec.js | 2 | ||||
-rw-r--r-- | spec/frontend/repository/components/table/row_spec.js | 9 | ||||
-rw-r--r-- | spec/frontend/repository/log_tree_spec.js | 9 |
3 files changed, 15 insertions, 5 deletions
diff --git a/spec/frontend/repository/components/table/index_spec.js b/spec/frontend/repository/components/table/index_spec.js index 1e2f3501c8c..41450becabb 100644 --- a/spec/frontend/repository/components/table/index_spec.js +++ b/spec/frontend/repository/components/table/index_spec.js @@ -9,6 +9,7 @@ let $apollo; const MOCK_BLOBS = [ { id: '123abc', + sha: '123abc', flatPath: 'blob', name: 'blob.md', type: 'blob', @@ -16,6 +17,7 @@ const MOCK_BLOBS = [ }, { id: '124abc', + sha: '124abc', flatPath: 'blob2', name: 'blob2.md', type: 'blob', diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js index 04a5e0778a1..aa0b9385f1a 100644 --- a/spec/frontend/repository/components/table/row_spec.js +++ b/spec/frontend/repository/components/table/row_spec.js @@ -41,6 +41,7 @@ describe('Repository table row component', () => { it('renders table row', () => { factory({ id: '1', + sha: '123', path: 'test', type: 'file', currentPath: '/', @@ -57,6 +58,7 @@ describe('Repository table row component', () => { `('renders a $componentName for type $type', ({ type, component }) => { factory({ id: '1', + sha: '123', path: 'test', type, currentPath: '/', @@ -73,6 +75,7 @@ describe('Repository table row component', () => { `('pushes new router if type $type is tree', ({ type, pushes }) => { factory({ id: '1', + sha: '123', path: 'test', type, currentPath: '/', @@ -95,6 +98,7 @@ describe('Repository table row component', () => { `('calls visitUrl if $type is not tree', ({ type, pushes }) => { factory({ id: '1', + sha: '123', path: 'test', type, currentPath: '/', @@ -112,6 +116,7 @@ describe('Repository table row component', () => { it('renders commit ID for submodule', () => { factory({ id: '1', + sha: '123', path: 'test', type: 'commit', currentPath: '/', @@ -123,6 +128,7 @@ describe('Repository table row component', () => { it('renders link with href', () => { factory({ id: '1', + sha: '123', path: 'test', type: 'blob', url: 'https://test.com', @@ -135,6 +141,7 @@ describe('Repository table row component', () => { it('renders LFS badge', () => { factory({ id: '1', + sha: '123', path: 'test', type: 'commit', currentPath: '/', @@ -147,6 +154,7 @@ describe('Repository table row component', () => { it('renders commit and web links with href for submodule', () => { factory({ id: '1', + sha: '123', path: 'test', type: 'commit', url: 'https://test.com', @@ -161,6 +169,7 @@ describe('Repository table row component', () => { it('renders lock icon', () => { factory({ id: '1', + sha: '123', path: 'test', type: 'tree', currentPath: '/', diff --git a/spec/frontend/repository/log_tree_spec.js b/spec/frontend/repository/log_tree_spec.js index ad42f8b2ffc..9199c726680 100644 --- a/spec/frontend/repository/log_tree_spec.js +++ b/spec/frontend/repository/log_tree_spec.js @@ -41,7 +41,7 @@ describe('fetchLogsTree', () => { jest.spyOn(axios, 'get'); - global.gon = { gitlab_url: 'https://test.com' }; + global.gon = { relative_url_root: '' }; client = { readQuery: () => ({ @@ -64,10 +64,9 @@ describe('fetchLogsTree', () => { it('calls axios get', () => fetchLogsTree(client, '', '0', resolver).then(() => { - expect(axios.get).toHaveBeenCalledWith( - 'https://test.com/gitlab-org/gitlab-foss/refs/master/logs_tree/', - { params: { format: 'json', offset: '0' } }, - ); + expect(axios.get).toHaveBeenCalledWith('/gitlab-org/gitlab-foss/refs/master/logs_tree/', { + params: { format: 'json', offset: '0' }, + }); })); it('calls axios get once', () => |