diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/haml_lint | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/haml_lint')
-rw-r--r-- | spec/haml_lint/linter/documentation_links_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/haml_lint/linter/documentation_links_spec.rb b/spec/haml_lint/linter/documentation_links_spec.rb index 22c406de57a..75002097d69 100644 --- a/spec/haml_lint/linter/documentation_links_spec.rb +++ b/spec/haml_lint/linter/documentation_links_spec.rb @@ -10,30 +10,30 @@ RSpec.describe HamlLint::Linter::DocumentationLinks do shared_examples 'link validation rules' do |link_pattern| context 'when link_to points to the existing file path' do - let(:haml) { "= link_to 'Description', #{link_pattern}('README.md')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index.md')" } it { is_expected.not_to report_lint } end context 'when link_to points to the existing file with valid anchor' do - let(:haml) { "= link_to 'Description', #{link_pattern}('README.md', anchor: 'overview'), target: '_blank'" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'overview'), target: '_blank'" } it { is_expected.not_to report_lint } end context 'when link_to points to the existing file path without .md extension' do - let(:haml) { "= link_to 'Description', #{link_pattern}('README')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index')" } it { is_expected.not_to report_lint } end context 'when anchor is not correct' do - let(:haml) { "= link_to 'Description', #{link_pattern}('README.md', anchor: 'wrong')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'wrong')" } it { is_expected.to report_lint } context "when #{link_pattern} has multiple options" do - let(:haml) { "= link_to 'Description', #{link_pattern}('README.md', key: :value, anchor: 'wrong')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', key: :value, anchor: 'wrong')" } it { is_expected.to report_lint } end @@ -58,7 +58,7 @@ RSpec.describe HamlLint::Linter::DocumentationLinks do end context 'when anchor belongs to a different element' do - let(:haml) { "= link_to 'Description', #{link_pattern}('README.md'), target: (anchor: 'blank')" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index.md'), target: (anchor: 'blank')" } it { is_expected.not_to report_lint } end @@ -82,7 +82,7 @@ RSpec.describe HamlLint::Linter::DocumentationLinks do end context 'when the second link is invalid' do - let(:haml) { ".data-form{ data: { url: #{link_pattern}('README.md'), wrong_url: #{link_pattern}('wrong.md') } }" } + let(:haml) { ".data-form{ data: { url: #{link_pattern}('index.md'), wrong_url: #{link_pattern}('wrong.md') } }" } it { is_expected.to report_lint } end |