diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-11-15 04:37:17 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-11-14 20:37:17 +0100 |
commit | 20150659e6f084d6c6fb4080d08c4104b8ac0570 (patch) | |
tree | 62d0eef7a965d6dd942970cfe4e830bca514c388 /spec/models | |
parent | 8087aa83d414150fd1141d237ae9d7c0366fec8d (diff) |
Add uniqueness to block email domains (#5692)
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/email_domain_block_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/email_domain_block_spec.rb b/spec/models/email_domain_block_spec.rb index 5f5d189d9..efd2853a9 100644 --- a/spec/models/email_domain_block_spec.rb +++ b/spec/models/email_domain_block_spec.rb @@ -13,9 +13,10 @@ RSpec.describe EmailDomainBlock, type: :model do Fabricate(:email_domain_block, domain: 'example.com') expect(EmailDomainBlock.block?('nyarn@example.com')).to eq true end + it 'returns true if the domain is not registed' do - Fabricate(:email_domain_block, domain: 'domain') - expect(EmailDomainBlock.block?('example')).to eq false + Fabricate(:email_domain_block, domain: 'example.com') + expect(EmailDomainBlock.block?('nyarn@example.net')).to eq false end end end |