diff options
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 59a6cfbf4f5..0a3a0f7da18 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -221,6 +221,20 @@ describe ApplicationController do end end + describe '#set_page_title_header' do + let(:controller) { described_class.new } + + it 'URI encodes UTF-8 characters in the title' do + response = double(headers: {}) + allow_any_instance_of(PageLayoutHelper).to receive(:page_title).and_return('€100 · GitLab') + allow(controller).to receive(:response).and_return(response) + + controller.send(:set_page_title_header) + + expect(response.headers['Page-Title']).to eq('%E2%82%AC100%20%C2%B7%20GitLab') + end + end + context 'two-factor authentication' do let(:controller) { described_class.new } |