Commit bed05573f2477629daa0c4ab4a596d04fc6ef594
1 parent
5a1eee95
Exists in
fix_string_downcase_and_upcase
fix_string_downcase_and_upcase with tests
Showing
2 changed files
with
18 additions
and
0 deletions
Show diff stats
lib/noosfero/core_ext/string.rb
test/unit/string_core_ext_test.rb
... | ... | @@ -38,4 +38,14 @@ class StringCoreExtTest < ActiveSupport::TestCase |
38 | 38 | assert_equal 'spaceship-propulsion_warp-core', "SpaceshipPropulsion::WarpCore".to_css_class |
39 | 39 | end |
40 | 40 | |
41 | + should 'downcase accented strings' do | |
42 | + assert_equal 'vatapá com dendê da moça', 'VATAPÁ COM DENDÊ DA MOÇA'.downcase | |
43 | + assert_equal 'vatapá com dendê da moça', 'VATAPÁ COM dendê da moça'.downcase | |
44 | + end | |
45 | + | |
46 | + should 'upcase accented strings' do | |
47 | + assert_equal 'VATAPÁ COM DENDÊ DA MOÇA', 'vatapá com dendê da moça'.upcase | |
48 | + assert_equal 'VATAPÁ COM DENDÊ DA MOÇA', 'VATAPÁ COM dendê da MOÇA'.upcase | |
49 | + end | |
50 | + | |
41 | 51 | end | ... | ... |