diff options
Diffstat (limited to 'spec/support/shared_examples/application_setting_examples.rb')
-rw-r--r-- | spec/support/shared_examples/application_setting_examples.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/shared_examples/application_setting_examples.rb b/spec/support/shared_examples/application_setting_examples.rb index 2c600785ad3..0e6a8059376 100644 --- a/spec/support/shared_examples/application_setting_examples.rb +++ b/spec/support/shared_examples/application_setting_examples.rb @@ -40,6 +40,11 @@ RSpec.shared_examples 'string of domains' do |attribute| setting.method("#{attribute}_raw=").call("example;34543:garbage:fdh5654;") expect(setting.method(attribute).call).to contain_exactly('example', '34543:garbage:fdh5654') end + + it 'does not raise error with nil' do + setting.method("#{attribute}_raw=").call(nil) + expect(setting.method(attribute).call).to eq([]) + end end RSpec.shared_examples 'application settings examples' do @@ -75,6 +80,12 @@ RSpec.shared_examples 'application settings examples' do expect(setting.outbound_local_requests_whitelist_arrays).to contain_exactly(ip_whitelist, domain_whitelist) end + + it 'does not raise error with nil' do + setting.outbound_local_requests_whitelist = nil + + expect(setting.outbound_local_requests_whitelist_arrays).to contain_exactly([], []) + end end describe 'usage ping settings' do |