mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add relevant_params to ReportFilter (matches account filter) (#32136)
This commit is contained in:
@@ -30,4 +30,17 @@ RSpec.describe ReportFilter do
|
||||
expect(Report).to have_received(:resolved)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when given remote target_origin and also by_target_domain' do
|
||||
let!(:matching_report) { Fabricate :report, target_account: Fabricate(:account, domain: 'match.example') }
|
||||
let!(:non_matching_report) { Fabricate :report, target_account: Fabricate(:account, domain: 'other.example') }
|
||||
|
||||
it 'preserves the domain value' do
|
||||
filter = described_class.new(by_target_domain: 'match.example', target_origin: 'remote')
|
||||
|
||||
expect(filter.results)
|
||||
.to include(matching_report)
|
||||
.and not_include(non_matching_report)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user