diff options
Diffstat (limited to 'spec/models/block_spec.rb')
-rw-r--r-- | spec/models/block_spec.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/spec/models/block_spec.rb b/spec/models/block_spec.rb index acbdc77f5..6e31786d0 100644 --- a/spec/models/block_spec.rb +++ b/spec/models/block_spec.rb @@ -1,12 +1,9 @@ +# frozen_string_literal: true + require 'rails_helper' RSpec.describe Block, type: :model do describe 'validations' do - it 'has a valid fabricator' do - block = Fabricate.build(:block) - expect(block).to be_valid - end - it 'is invalid without an account' do block = Fabricate.build(:block, account: nil) block.valid? @@ -28,8 +25,8 @@ RSpec.describe Block, type: :model do Block.create!(account: account, target_account: target_account) - expect(Rails.cache.exist?("exclude_account_ids_for:#{account.id}")).to eq false - expect(Rails.cache.exist?("exclude_account_ids_for:#{target_account.id}")).to eq false + expect(Rails.cache.exist?("exclude_account_ids_for:#{account.id}")).to be false + expect(Rails.cache.exist?("exclude_account_ids_for:#{target_account.id}")).to be false end it 'removes blocking cache after destruction' do @@ -41,7 +38,7 @@ RSpec.describe Block, type: :model do block.destroy! - expect(Rails.cache.exist?("exclude_account_ids_for:#{account.id}")).to eq false - expect(Rails.cache.exist?("exclude_account_ids_for:#{target_account.id}")).to eq false + expect(Rails.cache.exist?("exclude_account_ids_for:#{account.id}")).to be false + expect(Rails.cache.exist?("exclude_account_ids_for:#{target_account.id}")).to be false end end |