diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-30 12:09:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-30 12:09:39 +0300 |
commit | ada214dc52b53bd9eb3a79c279506f91c547f721 (patch) | |
tree | f4266ef83f9be3a62a0f8942911058758655929a /spec/views/help | |
parent | 27b43bd4d613cc7b8773ca0863b8d8f9b90f6d87 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/help')
-rw-r--r-- | spec/views/help/index.html.haml_spec.rb | 12 | ||||
-rw-r--r-- | spec/views/help/show.html.haml_spec.rb | 18 |
2 files changed, 30 insertions, 0 deletions
diff --git a/spec/views/help/index.html.haml_spec.rb b/spec/views/help/index.html.haml_spec.rb index 98040da9d2c..3831ddacb72 100644 --- a/spec/views/help/index.html.haml_spec.rb +++ b/spec/views/help/index.html.haml_spec.rb @@ -53,6 +53,18 @@ describe 'help/index' do end end + describe 'Markdown rendering' do + before do + assign(:help_index, 'Welcome to [GitLab](https://about.gitlab.com/) Documentation.') + end + + it 'renders Markdown' do + render + + expect(rendered).to have_link('GitLab', href: 'https://about.gitlab.com/') + end + end + def stub_user(user = double) allow(view).to receive(:user_signed_in?).and_return(user) end diff --git a/spec/views/help/show.html.haml_spec.rb b/spec/views/help/show.html.haml_spec.rb new file mode 100644 index 00000000000..539c647c1d3 --- /dev/null +++ b/spec/views/help/show.html.haml_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'help/show' do + describe 'Markdown rendering' do + before do + assign(:path, 'ssh/README') + assign(:markdown, 'Welcome to [GitLab](https://about.gitlab.com/) Documentation.') + end + + it 'renders Markdown' do + render + + expect(rendered).to have_link('GitLab', href: 'https://about.gitlab.com/') + end + end +end |