diff options
Diffstat (limited to 'spec/config/settings_spec.rb')
-rw-r--r-- | spec/config/settings_spec.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/spec/config/settings_spec.rb b/spec/config/settings_spec.rb index 0928f2b72ff..55e675d5107 100644 --- a/spec/config/settings_spec.rb +++ b/spec/config/settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Settings, feature_category: :authentication_and_authorization do +RSpec.describe Settings, feature_category: :system_access do using RSpec::Parameterized::TableSyntax describe 'omniauth' do @@ -31,7 +31,7 @@ RSpec.describe Settings, feature_category: :authentication_and_authorization do with_them do before do allow(Gitlab.config).to receive(:gitlab).and_return( - Settingslogic.new({ + GitlabSettings::Options.build({ 'host' => host, 'https' => true, 'port' => port, @@ -198,4 +198,18 @@ RSpec.describe Settings, feature_category: :authentication_and_authorization do end end end + + describe '.build_sidekiq_routing_rules' do + using RSpec::Parameterized::TableSyntax + + where(:input_rules, :result) do + nil | [['*', 'default']] + [] | [['*', 'default']] + [['name=foobar', 'foobar']] | [['name=foobar', 'foobar']] + end + + with_them do + it { expect(described_class.send(:build_sidekiq_routing_rules, input_rules)).to eq(result) } + end + end end |