Fix: 投稿にNGワードが含まれる場合、投稿のモデレーションができなくなる場合がある問題 (#685)
This commit is contained in:
parent
4a9f549dd2
commit
e7aececf5e
5 changed files with 23 additions and 8 deletions
|
@ -277,6 +277,13 @@ RSpec.describe UpdateStatusService do
|
|||
expect { subject.call(status, status.account_id, text: text) }.to raise_error(Mastodon::ValidationError)
|
||||
end
|
||||
|
||||
it 'bypass ng words' do
|
||||
text = 'ng word test'
|
||||
Fabricate(:ng_word, keyword: 'test', stranger: false)
|
||||
|
||||
expect { subject.call(status, status.account_id, text: text, bypass_validation: true) }.to_not raise_error
|
||||
end
|
||||
|
||||
it 'not hit ng words' do
|
||||
text = 'ng word aiueo'
|
||||
Fabricate(:ng_word, keyword: 'test', stranger: false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue