about summary refs log tree commit diff
path: root/spec/models/domain_block_spec.rb
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-04-14 19:22:47 -0500
committerStarfall <us@starfall.systems>2023-04-14 19:22:47 -0500
commit4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (patch)
tree6811b845bb7f4966b10dcefa3dea404246f161c7 /spec/models/domain_block_spec.rb
parent65c1e53a32cabcdbb7bca57002bb0f6acdebe07e (diff)
parentbed63f6dae0879ac840066b031229e0d139089cd (diff)
Merge remote-tracking branch 'glitch/main' HEAD main
Diffstat (limited to 'spec/models/domain_block_spec.rb')
-rw-r--r--spec/models/domain_block_spec.rb13
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/models/domain_block_spec.rb b/spec/models/domain_block_spec.rb
index 28647dc89..9839ee9d4 100644
--- a/spec/models/domain_block_spec.rb
+++ b/spec/models/domain_block_spec.rb
@@ -1,12 +1,9 @@
+# frozen_string_literal: true
+
 require 'rails_helper'
 
 RSpec.describe DomainBlock, type: :model do
   describe 'validations' do
-    it 'has a valid fabricator' do
-      domain_block = Fabricate.build(:domain_block)
-      expect(domain_block).to be_valid
-    end
-
     it 'is invalid without a domain' do
       domain_block = Fabricate.build(:domain_block, domain: nil)
       domain_block.valid?
@@ -24,16 +21,16 @@ RSpec.describe DomainBlock, type: :model do
   describe '.blocked?' do
     it 'returns true if the domain is suspended' do
       Fabricate(:domain_block, domain: 'example.com', severity: :suspend)
-      expect(DomainBlock.blocked?('example.com')).to eq true
+      expect(DomainBlock.blocked?('example.com')).to be true
     end
 
     it 'returns false even if the domain is silenced' do
       Fabricate(:domain_block, domain: 'example.com', severity: :silence)
-      expect(DomainBlock.blocked?('example.com')).to eq false
+      expect(DomainBlock.blocked?('example.com')).to be false
     end
 
     it 'returns false if the domain is not suspended nor silenced' do
-      expect(DomainBlock.blocked?('example.com')).to eq false
+      expect(DomainBlock.blocked?('example.com')).to be false
     end
   end