Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/projects/commit/show.html.haml_spec.rb')
-rw-r--r--spec/views/projects/commit/show.html.haml_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/views/projects/commit/show.html.haml_spec.rb b/spec/views/projects/commit/show.html.haml_spec.rb
index 59182f6e757..4d5c987ce37 100644
--- a/spec/views/projects/commit/show.html.haml_spec.rb
+++ b/spec/views/projects/commit/show.html.haml_spec.rb
@@ -67,5 +67,13 @@ RSpec.describe 'projects/commit/show.html.haml' do
expect(rendered).to have_content("This commit is part of merge request")
expect(rendered).to have_link(merge_request.to_reference, href: merge_request_url)
end
+
+ context 'when merge request is nil' do
+ let(:merge_request) { nil }
+
+ it 'renders the page' do
+ expect { rendered }.not_to raise_error
+ end
+ end
end
end