mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-26 05:31:36 +01:00
Fix case-insensitive match scenario; test some word ornamentation. #164.
This commit is contained in:
parent
603cf02b70
commit
9f609bc94e
1 changed files with 7 additions and 1 deletions
|
@ -51,7 +51,13 @@ RSpec.describe KeywordMute, type: :model do
|
|||
it 'matches if at least one keyword case-insensitively matches the text' do
|
||||
KeywordMute.create!(account: alice, keyword: 'hot')
|
||||
|
||||
expect(matcher =~ 'This is a hot take').to be_truthy
|
||||
expect(matcher =~ 'This is a HOT take').to be_truthy
|
||||
end
|
||||
|
||||
it 'matches keywords surrounded by non-alphanumeric ornamentation' do
|
||||
KeywordMute.create!(account: alice, keyword: 'hot')
|
||||
|
||||
expect(matcher =~ 'This is a ~*HOT*~ take').to be_truthy
|
||||
end
|
||||
|
||||
it 'uses case-folding rules appropriate for more than just English' do
|
||||
|
|
Loading…
Reference in a new issue