Move account silence-related methods to concern (#28866)

This commit is contained in:
Matt Jankowski 2024-11-11 03:29:55 -05:00 committed by GitHub
parent 157fba4698
commit d033920b7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 41 additions and 22 deletions

View file

@ -0,0 +1,18 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Account::Silences do
describe 'Scopes' do
describe '.silenced' do
let(:silenced_account) { Fabricate :account, silenced: true }
before { Fabricate :account, silenced: false }
it 'returns an array of accounts who are silenced' do
expect(Account.silenced)
.to contain_exactly(silenced_account)
end
end
end
end