0
0
Fork 0

Fix RSpec/DescribedClass cop (#25104)

This commit is contained in:
Matt Jankowski 2023-06-06 07:58:33 -04:00 committed by GitHub
parent 1e243e2df7
commit c42591356d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 347 additions and 414 deletions

View file

@ -7,14 +7,14 @@ RSpec.describe AccountDomainBlock do
account = Fabricate(:account)
Rails.cache.write("exclude_domains_for:#{account.id}", 'a.domain.already.blocked')
AccountDomainBlock.create!(account: account, domain: 'a.domain.blocked.later')
described_class.create!(account: account, domain: 'a.domain.blocked.later')
expect(Rails.cache.exist?("exclude_domains_for:#{account.id}")).to be false
end
it 'removes blocking cache after destruction' do
account = Fabricate(:account)
block = AccountDomainBlock.create!(account: account, domain: 'domain')
block = described_class.create!(account: account, domain: 'domain')
Rails.cache.write("exclude_domains_for:#{account.id}", 'domain')
block.destroy!