mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Make autotag watched words case insensitive (#13043)
* FIX: Hide tag watched words if tagging is disabled These 'autotag' words were shown even if tagging was disabled. * FIX: Make autotag watched words case insensitive This commit also fixes the bug when no tag was applied if no other tag was already present.
This commit is contained in:
@@ -503,10 +503,10 @@ describe PostCreator do
|
||||
|
||||
context "without regular expressions" do
|
||||
it "works" do
|
||||
Fabricate(:watched_word, action: WatchedWord.actions[:tag], word: "hello", replacement: "greetings , hey")
|
||||
Fabricate(:watched_word, action: WatchedWord.actions[:tag], word: "HELLO", replacement: "greetings , hey")
|
||||
|
||||
@post = creator_with_tags.create
|
||||
expect(@post.topic.tags.map(&:name)).to match_array(tag_names + ['greetings', 'hey'])
|
||||
@post = creator.create
|
||||
expect(@post.topic.tags.map(&:name)).to match_array(['greetings', 'hey'])
|
||||
end
|
||||
|
||||
it "does not treat as regular expressions" do
|
||||
|
||||
Reference in New Issue
Block a user