Fix to show renamed file in mr

This commit is contained in:
Samantha Ming 2019-08-21 08:23:22 +00:00 committed by Filipa Lacerda
parent 006bc12436
commit 261f4fe7ac
3 changed files with 7 additions and 2 deletions

View File

@ -130,7 +130,7 @@ export default {
return `\`${this.diffFile.file_path}\``;
},
isFileRenamed() {
return this.diffFile.viewer.name === diffViewerModes.renamed;
return this.diffFile.renamed_file;
},
isModeChanged() {
return this.diffFile.viewer.name === diffViewerModes.mode_changed;

View File

@ -0,0 +1,5 @@
---
title: Fix to show renamed file in mr
merge_request: 31888
author:
type: changed

View File

@ -372,7 +372,7 @@ describe('diff_file_header', () => {
});
it('displays old and new path if the file was renamed', () => {
props.diffFile.viewer.name = diffViewerModes.renamed;
props.diffFile.renamed_file = true;
vm = mountComponentWithStore(Component, { props, store });