diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-25 15:06:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-25 15:06:13 +0300 |
commit | 8f1f6b374b69fd6356bdc5561d56f5ca9db9fadd (patch) | |
tree | 9b81a74772b269cf3d851ed2d29f97c31985b98a /spec/frontend | |
parent | dbd50b6e203994cdb393494faa8fc1b2fb406487 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/repository/log_tree_spec.js | 19 | ||||
-rw-r--r-- | spec/frontend/repository/utils/commit_spec.js | 3 |
2 files changed, 16 insertions, 6 deletions
diff --git a/spec/frontend/repository/log_tree_spec.js b/spec/frontend/repository/log_tree_spec.js index 9199c726680..4271a038680 100644 --- a/spec/frontend/repository/log_tree_spec.js +++ b/spec/frontend/repository/log_tree_spec.js @@ -21,11 +21,18 @@ describe('resolveCommit', () => { entry: { name: 'index.js', type: 'blob' }, resolve: jest.fn(), }; - const commits = [{ fileName: 'index.js', type: 'blob' }]; - - resolveCommit(commits, resolver); - - expect(resolver.resolve).toHaveBeenCalledWith({ fileName: 'index.js', type: 'blob' }); + const commits = [ + { fileName: 'index.js', filePath: '/index.js', type: 'blob' }, + { fileName: 'index.js', filePath: '/app/assets/index.js', type: 'blob' }, + ]; + + resolveCommit(commits, '', resolver); + + expect(resolver.resolve).toHaveBeenCalledWith({ + fileName: 'index.js', + filePath: '/index.js', + type: 'blob', + }); }); }); @@ -84,6 +91,7 @@ describe('fetchLogsTree', () => { commitPath: 'https://test.com', committedDate: '2019-01-01', fileName: 'index.js', + filePath: '/index.js', message: 'testing message', sha: '123', type: 'blob', @@ -101,6 +109,7 @@ describe('fetchLogsTree', () => { commitPath: 'https://test.com', committedDate: '2019-01-01', fileName: 'index.js', + filePath: '/index.js', message: 'testing message', sha: '123', type: 'blob', diff --git a/spec/frontend/repository/utils/commit_spec.js b/spec/frontend/repository/utils/commit_spec.js index 2d75358106c..e7cc28178bf 100644 --- a/spec/frontend/repository/utils/commit_spec.js +++ b/spec/frontend/repository/utils/commit_spec.js @@ -15,13 +15,14 @@ const mockData = [ describe('normalizeData', () => { it('normalizes data into LogTreeCommit object', () => { - expect(normalizeData(mockData)).toEqual([ + expect(normalizeData(mockData, '')).toEqual([ { sha: '123', message: 'testing message', committedDate: '2019-01-01', commitPath: 'https://test.com', fileName: 'index.js', + filePath: '/index.js', type: 'blob', __typename: 'LogTreeCommit', }, |