diff options
Diffstat (limited to 'spec/frontend/blob/components/blob_header_filepath_spec.js')
-rw-r--r-- | spec/frontend/blob/components/blob_header_filepath_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/frontend/blob/components/blob_header_filepath_spec.js b/spec/frontend/blob/components/blob_header_filepath_spec.js index d029ba2a7a4..3a53208f357 100644 --- a/spec/frontend/blob/components/blob_header_filepath_spec.js +++ b/spec/frontend/blob/components/blob_header_filepath_spec.js @@ -15,7 +15,7 @@ describe('Blob Header Filepath', () => { function createComponent(blobProps = {}, options = {}) { wrapper = shallowMount(BlobHeaderFilepath, { propsData: { - blob: Object.assign({}, MockBlob, blobProps), + blob: { ...MockBlob, ...blobProps }, }, ...options, }); @@ -38,12 +38,12 @@ describe('Blob Header Filepath', () => { .find('.js-blob-header-filepath') .text() .trim(), - ).toBe(MockBlob.name); + ).toBe(MockBlob.path); }); it('does not fail if the name is empty', () => { - const emptyName = ''; - createComponent({ name: emptyName }); + const emptyPath = ''; + createComponent({ path: emptyPath }); expect(wrapper.find('.js-blob-header-filepath').exists()).toBe(false); }); @@ -84,7 +84,7 @@ describe('Blob Header Filepath', () => { describe('functionality', () => { it('sets gfm value correctly on the clipboard-button', () => { createComponent(); - expect(wrapper.vm.gfmCopyText).toBe('`dummy.md`'); + expect(wrapper.vm.gfmCopyText).toBe(`\`${MockBlob.path}\``); }); }); }); |