diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-07-15 21:20:45 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-19 01:52:29 +0300 |
commit | 7943767267873423acb1eddbf00b6c5684f7849f (patch) | |
tree | 25d9e68252127fcc43a895358560dcac99dc83b4 /spec/models/application_setting_spec.rb | |
parent | e15fa67c9894ccb52aeb1f0116e083c9dbba24f5 (diff) |
Refactored the domain separator regex, plus syntax and grammar fixes.
Diffstat (limited to 'spec/models/application_setting_spec.rb')
-rw-r--r-- | spec/models/application_setting_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb index 582d9a8d8cd..ebcd9b0f947 100644 --- a/spec/models/application_setting_spec.rb +++ b/spec/models/application_setting_spec.rb @@ -77,27 +77,27 @@ describe ApplicationSetting, models: true do context 'blacklisted signup domains' do it 'set single domain' do setting.domain_blacklist_raw = 'example.com' - expect(setting.domain_blacklist).to eq(['example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com') end it 'set multiple domains with spaces' do setting.domain_blacklist_raw = 'example.com *.example.com' - expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end it 'set multiple domains with newlines and a space' do setting.domain_blacklist_raw = "example.com\n *.example.com" - expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end it 'set multiple domains with commas' do setting.domain_blacklist_raw = "example.com, *.example.com" - expect(setting.domain_blacklist).to eq(['example.com', '*.example.com']) + expect(setting.domain_blacklist).to contain_exactly('example.com', '*.example.com') end it 'set multiple domain with file' do setting.domain_blacklist_file = File.open(Rails.root.join('spec/fixtures/', 'blacklist.txt')) - expect(setting.domain_blacklist).to eq(%w(example.com test.com foo.bar)) + expect(setting.domain_blacklist).to contain_exactly('example.com', 'test.com', 'foo.bar') end end end |