FIX: Can't clean a tag if the given string is frozen.

This commit is contained in:
Guo Xiang Tan
2018-10-15 14:45:28 +08:00
parent 4c8fe13500
commit 8fa59f0548
2 changed files with 8 additions and 4 deletions

View File

@ -209,7 +209,8 @@ describe DiscourseTagging do
describe "clean_tag" do
it "downcases new tags if setting enabled" do
expect(DiscourseTagging.clean_tag("HeLlO")).to eq("hello")
expect(DiscourseTagging.clean_tag("HeLlO".freeze)).to eq("hello")
SiteSetting.force_lowercase_tags = false
expect(DiscourseTagging.clean_tag("HeLlO")).to eq("HeLlO")
end