diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 00:09:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 00:09:08 +0300 |
commit | 7671216b60e2796a050358ff808b4a0c2de3d22f (patch) | |
tree | 605dfc1339a3cd7dc7353ac6d725191086a9acca /spec/support | |
parent | c2367afbf57ebc65d5b78a743b5d6a91f0aece9f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/banzai/filters/inline_metrics_redactor_shared_examples.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/support/shared_examples/banzai/filters/inline_metrics_redactor_shared_examples.rb b/spec/support/shared_examples/banzai/filters/inline_metrics_redactor_shared_examples.rb index d283b3a3b27..07abb86ceb5 100644 --- a/spec/support/shared_examples/banzai/filters/inline_metrics_redactor_shared_examples.rb +++ b/spec/support/shared_examples/banzai/filters/inline_metrics_redactor_shared_examples.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.shared_examples 'a supported metrics dashboard url' do +RSpec.shared_examples 'redacts the embed placeholder' do context 'no user is logged in' do it 'redacts the placeholder' do expect(doc.to_s).to be_empty @@ -14,7 +14,9 @@ RSpec.shared_examples 'a supported metrics dashboard url' do expect(doc.to_s).to be_empty end end +end +RSpec.shared_examples 'retains the embed placeholder when applicable' do context 'the user has requisite permissions' do let(:user) { create(:user) } let(:doc) { filter(input, current_user: user) } @@ -22,7 +24,7 @@ RSpec.shared_examples 'a supported metrics dashboard url' do it 'leaves the placeholder' do project.add_maintainer(user) - expect(doc.to_s).to eq(input) + expect(CGI.unescapeHTML(doc.to_s)).to eq(input) end end end |