From 344f7629cda13fd0c6436e40fadc5e29083c421a Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Mon, 7 Mar 2016 22:10:49 -0300 Subject: [PATCH] Add spec to unicode upcase and downcase --- spec/components/text_cleaner_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/components/text_cleaner_spec.rb b/spec/components/text_cleaner_spec.rb index cf203c709cc..41d65a4ec16 100644 --- a/spec/components/text_cleaner_spec.rb +++ b/spec/components/text_cleaner_spec.rb @@ -187,6 +187,14 @@ describe TextCleaner do expect(TextCleaner.clean_title("Hello there ?")).to eq("Hello there?") end + it "replaces all upper case unicode text with regular unicode case letters" do + expect(TextCleaner.clean_title("INVESTIGAÇÃO POLÍTICA NA CÂMARA")).to eq("Investigação política na câmara") + end + + it "capitalizes first unicode letter" do + expect(TextCleaner.clean_title("épico encontro")).to eq("Épico encontro") + end + end end