diff options
author | Matt Jankowski <matt@jankowski.online> | 2023-03-04 11:16:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 17:16:45 +0100 |
commit | 506b16cf595bf441b9a85db608b6d19e8934fd7d (patch) | |
tree | b3e2a2ef9f519e5298539c684631be6c2726d817 /spec/models/domain_allow_spec.rb | |
parent | 7f4412eeeb1d35c9345c213b2cdfbbb9ce97dabb (diff) |
Pending example models minimal coverage (#23912)
Diffstat (limited to 'spec/models/domain_allow_spec.rb')
-rw-r--r-- | spec/models/domain_allow_spec.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/models/domain_allow_spec.rb b/spec/models/domain_allow_spec.rb index 18cf5fe4c..49e16376e 100644 --- a/spec/models/domain_allow_spec.rb +++ b/spec/models/domain_allow_spec.rb @@ -2,6 +2,17 @@ require 'rails_helper' -RSpec.describe DomainAllow, type: :model do - pending "add some examples to (or delete) #{__FILE__}" +describe DomainAllow do + describe 'scopes' do + describe 'matches_domain' do + let(:domain) { Fabricate(:domain_allow, domain: 'example.com') } + let(:other_domain) { Fabricate(:domain_allow, domain: 'example.biz') } + + it 'returns the correct records' do + results = described_class.matches_domain('example.com') + + expect(results).to eq([domain]) + end + end + end end |