diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-06 18:09:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-06 18:09:27 +0300 |
commit | 638e2f1c5f55988135da63c7aa57bcecb9355a2b (patch) | |
tree | c25a1deeec9e02411f52a5eb831c42fa41778f9a /spec/helpers | |
parent | 4958d96e262f6b31b2850123e4949536555b2d29 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/appearances_helper_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/helpers/appearances_helper_spec.rb b/spec/helpers/appearances_helper_spec.rb index 2b0192d24b3..4a32c586315 100644 --- a/spec/helpers/appearances_helper_spec.rb +++ b/spec/helpers/appearances_helper_spec.rb @@ -205,6 +205,30 @@ RSpec.describe AppearancesHelper do end end + describe '#custom_sign_in_description' do + it 'returns an empty string if no custom description is found' do + allow(helper).to receive(:current_appearance).and_return(nil) + allow(Gitlab::CurrentSettings).to receive(:current_application_settings).and_return(nil) + allow(Gitlab::CurrentSettings).to receive(:help_text).and_return(nil) + + expect(helper.custom_sign_in_description).to eq('') + end + + it 'returns a custom description if all the setting options are found' do + allow(helper).to receive(:markdown_field).and_return('1', '2') + allow(helper).to receive(:markdown).and_return('3') + + expect(helper.custom_sign_in_description).to eq('1<br>2<br>3') + end + + it 'returns a custom description if only one setting options is found' do + allow(helper).to receive(:markdown_field).and_return('', '2') + allow(helper).to receive(:markdown).and_return('') + + expect(helper.custom_sign_in_description).to eq('2') + end + end + describe '#brand_header_logo' do let(:options) { {} } |