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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-25 12:08:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-25 12:08:01 +0300
commit23a49ec99665278ca0b0915953858514311a274c (patch)
treed964d5bc30af8064ffb3a9fb2218e11b0a98094e /spec/lib/banzai
parentc1063d87e04b27c0a173a1a52597b0b225f195d1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/banzai')
-rw-r--r--spec/lib/banzai/filter/footnote_filter_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/footnote_filter_spec.rb b/spec/lib/banzai/filter/footnote_filter_spec.rb
index 5ac7d3af733..26bca571fdc 100644
--- a/spec/lib/banzai/filter/footnote_filter_spec.rb
+++ b/spec/lib/banzai/filter/footnote_filter_spec.rb
@@ -56,6 +56,19 @@ RSpec.describe Banzai::Filter::FootnoteFilter do
it 'properly adds the necessary ids and classes' do
expect(doc.to_html).to eq filtered_footnote.strip
end
+
+ context 'when GITLAB_TEST_FOOTNOTE_ID is set' do
+ let(:test_footnote_id) { '42' }
+ let(:identifier) { test_footnote_id }
+
+ before do
+ stub_env('GITLAB_TEST_FOOTNOTE_ID', test_footnote_id)
+ end
+
+ it 'uses the test footnote ID instead of a random number' do
+ expect(doc.to_html).to eq filtered_footnote.strip
+ end
+ end
end
context 'when detecting footnotes' do