Commit db4ff688 authored by Stan Hu's avatar Stan Hu

Fix failing spec in fallback diff note change

parent 980ac50b
...@@ -261,11 +261,11 @@ module Gitlab ...@@ -261,11 +261,11 @@ module Gitlab
def create_fallback_diff_note(merge_request, comment, position) def create_fallback_diff_note(merge_request, comment, position)
attributes = pull_request_comment_attributes(comment) attributes = pull_request_comment_attributes(comment)
note = "*Comment on " note = "*Comment on"
note += " #{position.old_path}:#{position.old_line} -->" if position.old_line note += " #{position.old_path}:#{position.old_line} -->" if position.old_line
note += " #{position.new_path}:#{position.new_line}" if position.new_line note += " #{position.new_path}:#{position.new_line}" if position.new_line
new += "*\n\n#{comment.note}" note += "*\n\n#{comment.note}"
attributes[:note] = note attributes[:note] = note
merge_request.notes.create!(attributes) merge_request.notes.create!(attributes)
......
...@@ -221,9 +221,6 @@ describe Gitlab::BitbucketServerImport::Importer do ...@@ -221,9 +221,6 @@ describe Gitlab::BitbucketServerImport::Importer do
expect(notes.first.note).to start_with('*Comment on .gitmodules') expect(notes.first.note).to start_with('*Comment on .gitmodules')
expect(notes.second.note).to start_with('*Comment on .gitmodules') expect(notes.second.note).to start_with('*Comment on .gitmodules')
end end
it 'restores branches of inaccessible SHAs' do
end
end end
describe 'inaccessible branches' do describe 'inaccessible branches' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment