diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/config/settings_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/config/settings_spec.rb')
-rw-r--r-- | spec/config/settings_spec.rb | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/spec/config/settings_spec.rb b/spec/config/settings_spec.rb index 1de0e7e6c26..9b721d8cfca 100644 --- a/spec/config/settings_spec.rb +++ b/spec/config/settings_spec.rb @@ -116,7 +116,7 @@ RSpec.describe Settings do describe '.cron_for_service_ping' do it 'returns correct crontab for some manually calculated example' do allow(Gitlab::CurrentSettings) - .to receive(:uuid) { 'd9e2f4e8-db1f-4e51-b03d-f427e1965c4a'} + .to receive(:uuid) { 'd9e2f4e8-db1f-4e51-b03d-f427e1965c4a' } expect(described_class.send(:cron_for_service_ping)).to eq('44 10 * * 4') end @@ -150,4 +150,30 @@ RSpec.describe Settings do expect(Settings.encrypted('tmp/tests/test.enc').read).to be_empty end end + + describe '.build_sidekiq_routing_rules' do + [ + [nil, [['*', 'default']]], + [[], [['*', 'default']]], + [[['name=foobar', 'foobar']], [['name=foobar', 'foobar']]] + ].each do |input_rules, output_rules| + context "Given input routing_rules #{input_rules}" do + it "returns output routing_rules #{output_rules}" do + expect(described_class.send(:build_sidekiq_routing_rules, input_rules)).to eq(output_rules) + end + end + end + end + + describe '.microsoft_graph_mailer' do + it 'defaults' do + expect(described_class.microsoft_graph_mailer.enabled).to be false + expect(described_class.microsoft_graph_mailer.user_id).to be_nil + expect(described_class.microsoft_graph_mailer.tenant).to be_nil + expect(described_class.microsoft_graph_mailer.client_id).to be_nil + expect(described_class.microsoft_graph_mailer.client_secret).to be_nil + expect(described_class.microsoft_graph_mailer.azure_ad_endpoint).to eq('https://login.microsoftonline.com') + expect(described_class.microsoft_graph_mailer.graph_endpoint).to eq('https://graph.microsoft.com') + end + end end |