summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/github_import/markdown_text_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/github_import/markdown_text_spec.rb')
-rw-r--r--spec/lib/gitlab/github_import/markdown_text_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/markdown_text_spec.rb b/spec/lib/gitlab/github_import/markdown_text_spec.rb
index 22bf10f36d8..2d159580b5f 100644
--- a/spec/lib/gitlab/github_import/markdown_text_spec.rb
+++ b/spec/lib/gitlab/github_import/markdown_text_spec.rb
@@ -27,6 +27,13 @@ RSpec.describe Gitlab::GithubImport::MarkdownText do
expect(text.to_s).to eq('Hello')
end
+ it 'returns empty text when it receives nil' do
+ author = double(:author, login: nil)
+ text = described_class.new(nil, author, true)
+
+ expect(text.to_s).to eq('')
+ end
+
it 'returns the text with an extra header when the author was not found' do
author = double(:author, login: 'Alice')
text = described_class.new('Hello', author)