diff options
Diffstat (limited to 'spec/frontend/batch_comments/components/preview_item_spec.js')
-rw-r--r-- | spec/frontend/batch_comments/components/preview_item_spec.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/spec/frontend/batch_comments/components/preview_item_spec.js b/spec/frontend/batch_comments/components/preview_item_spec.js index 173b2710a30..08167a94068 100644 --- a/spec/frontend/batch_comments/components/preview_item_spec.js +++ b/spec/frontend/batch_comments/components/preview_item_spec.js @@ -56,17 +56,30 @@ describe('Batch comments draft preview item component', () => { createComponent(false, { file_path: 'index.js', file_hash: 'abc', - position: { new_line: 1 }, + position: { + line_range: { + start: { + new_line: 1, + type: 'new', + }, + }, + }, }); - expect(vm.$el.querySelector('.bold').textContent).toContain(':1'); + expect(vm.$el.querySelector('.bold').textContent).toContain(':+1'); }); it('renders old line position', () => { createComponent(false, { file_path: 'index.js', file_hash: 'abc', - position: { old_line: 2 }, + position: { + line_range: { + start: { + old_line: 2, + }, + }, + }, }); expect(vm.$el.querySelector('.bold').textContent).toContain(':2'); |