diff options
Diffstat (limited to 'spec/lib/banzai/filter/footnote_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/footnote_filter_spec.rb | 13 |
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 |