FIX: allow_uppercase_posts didn't work for topic titles

This commit is contained in:
Gerhard Schlager
2018-10-08 23:50:06 +02:00
parent c889c0daee
commit 4881fb028f
2 changed files with 6 additions and 1 deletions

View File

@@ -180,6 +180,11 @@ describe TextCleaner do
expect(TextCleaner.clean_title("HELLO THERE")).to eq("Hello there")
end
it "doesn't replace all upper case text when uppercase posts are allowed" do
SiteSetting.allow_uppercase_posts = true
expect(TextCleaner.clean_title("HELLO THERE")).to eq("HELLO THERE")
end
it "capitalizes first letter" do
expect(TextCleaner.clean_title("hello there")).to eq("Hello there")
end