diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-31 11:42:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-31 11:42:44 +0000 |
commit | 15c040a6bd71894260b66a90685070c0babfee76 (patch) | |
tree | 27021108f64428697744973cddaede55930f4ef7 /spec/lib/banzai | |
parent | 6e4e4023b46c786a99e1cfe8832fa5eff2728e0d (diff) | |
download | gitlab-ce-15c040a6bd71894260b66a90685070c0babfee76.tar.gz |
Add latest changes from gitlab-org/security/gitlab@13-12-stable-ee
Diffstat (limited to 'spec/lib/banzai')
-rw-r--r-- | spec/lib/banzai/pipeline/post_process_pipeline_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/lib/banzai/pipeline/post_process_pipeline_spec.rb b/spec/lib/banzai/pipeline/post_process_pipeline_spec.rb index ebe1ca4d403..55038d58f22 100644 --- a/spec/lib/banzai/pipeline/post_process_pipeline_spec.rb +++ b/spec/lib/banzai/pipeline/post_process_pipeline_spec.rb @@ -36,9 +36,11 @@ RSpec.describe Banzai::Pipeline::PostProcessPipeline do end let(:doc) { HTML::Pipeline.parse(html) } + let(:non_related_xpath_calls) { 2 } it 'searches for attributes only once' do - expect(doc).to receive(:search).once.and_call_original + expect(doc).to receive(:xpath).exactly(non_related_xpath_calls + 1).times + .and_call_original subject end @@ -49,7 +51,8 @@ RSpec.describe Banzai::Pipeline::PostProcessPipeline do end it 'searches for attributes twice' do - expect(doc).to receive(:search).twice.and_call_original + expect(doc).to receive(:xpath).exactly(non_related_xpath_calls + 2).times + .and_call_original subject end |