1
0
Fork 0
forked from gitea/nas

Fix: 投稿編集時にハッシュタグ拒否のドメインブロックが動作しない問題 (#519)

This commit is contained in:
KMY(雪あすか) 2024-02-05 09:07:51 +09:00 committed by GitHub
parent a686391169
commit 64a149b338
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 1 deletions

View file

@ -310,6 +310,19 @@ RSpec.describe ActivityPub::ProcessStatusUpdateService, type: :service do
end
end
context 'when reject tags by domain-block' do
let(:tags) { [Fabricate(:tag, name: 'hoge'), Fabricate(:tag, name: 'ohagi')] }
before do
Fabricate(:domain_block, domain: 'example.com', severity: :noop, reject_hashtag: true)
subject.call(status, json, json)
end
it 'updates tags' do
expect(status.tags.reload.map(&:name)).to eq []
end
end
context 'when originally without mentions' do
before do
subject.call(status, json, json)