diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-22 23:56:20 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-24 00:27:30 +0300 |
commit | 6e698b254ecddf23a866d9e98a885912102ccbce (patch) | |
tree | 3ce0ea2a254bb9f6148615295ac2ccce5794cf6b /spec/helpers | |
parent | 14a0841acda66d896b3a7f4459ec0fc4fc44f7f2 (diff) |
Fix specs
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/notes_helper_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/helpers/notes_helper_spec.rb b/spec/helpers/notes_helper_spec.rb index 099146678ae..355a4845afb 100644 --- a/spec/helpers/notes_helper_spec.rb +++ b/spec/helpers/notes_helper_spec.rb @@ -92,7 +92,13 @@ describe NotesHelper do ) end - let(:discussion) { create(:diff_note_on_merge_request, noteable: merge_request, project: project, position: position).to_discussion } + let(:diff_note) { create(:diff_note_on_merge_request, noteable: merge_request, project: project, position: position) } + let(:discussion) { diff_note.to_discussion } + + before do + diff_note.position = diff_note.original_position + diff_note.save! + end it 'returns the diff version comparison path with the line code' do expect(helper.discussion_path(discussion)).to eq(diffs_namespace_project_merge_request_path(project.namespace, project, merge_request, diff_id: merge_request_diff3, start_sha: merge_request_diff1.head_commit_sha, anchor: discussion.line_code)) |