Add: #545 NGワード指定で実際に除外された投稿のログ (#561)

This commit is contained in:
KMY(雪あすか) 2024-02-16 17:52:59 +09:00 committed by GitHub
parent 0ca2a73fd2
commit 7421c89431
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 262 additions and 17 deletions

View file

@ -308,12 +308,21 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
Setting.ng_words = ['Amazon']
subject
expect(account.reload.display_name).to eq 'Ohagi'
history = NgwordHistory.find_by(uri: payload[:id])
expect(history).to be_nil
end
it 'does not create account when ng word is set' do
Setting.ng_words = ['Ohagi']
subject
expect(account.reload.display_name).to_not eq 'Ohagi'
history = NgwordHistory.find_by(uri: payload[:id])
expect(history).to_not be_nil
expect(history.account_name_blocked?).to be true
expect(history.within_ng_words?).to be true
expect(history.keyword).to eq 'Ohagi'
end
end