diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-01 01:38:14 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-08-01 01:38:14 +0300 |
commit | db4ff688da690f3b7c182e5e9f4f9146518c1d69 (patch) | |
tree | c0ed000e9a1f609989391290a8f1d4a54e7a7c23 | |
parent | 980ac50b2796968a6e3d4a9eb497b41059b6034b (diff) |
Fix failing spec in fallback diff note change
-rw-r--r-- | lib/gitlab/bitbucket_server_import/importer.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/bitbucket_server_import/importer_spec.rb | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb index 69f9cc398c8..eb3b76409cd 100644 --- a/lib/gitlab/bitbucket_server_import/importer.rb +++ b/lib/gitlab/bitbucket_server_import/importer.rb @@ -261,11 +261,11 @@ module Gitlab def create_fallback_diff_note(merge_request, comment, position) 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.new_path}:#{position.new_line}" if position.new_line - new += "*\n\n#{comment.note}" + note += "*\n\n#{comment.note}" attributes[:note] = note merge_request.notes.create!(attributes) diff --git a/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb b/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb index ae067a9f79a..760cd3eb7f3 100644 --- a/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb +++ b/spec/lib/gitlab/bitbucket_server_import/importer_spec.rb @@ -221,9 +221,6 @@ describe Gitlab::BitbucketServerImport::Importer do expect(notes.first.note).to start_with('*Comment on .gitmodules') expect(notes.second.note).to start_with('*Comment on .gitmodules') end - - it 'restores branches of inaccessible SHAs' do - end end describe 'inaccessible branches' do |