Commit 4fc205a3bf387c1aae10a6f9697c687ad99a09dd
1 parent
ca8bc6e0
Exists in
master
and in
28 other branches
tags-helper-test: avoid iconv unpredicatable order with accents
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
test/unit/tags_helper_test.rb
| ... | ... | @@ -20,14 +20,14 @@ class TagsHelperTest < ActiveSupport::TestCase |
| 20 | 20 | |
| 21 | 21 | should 'order tags alphabetically with special characters' do |
| 22 | 22 | result = tag_cloud( |
| 23 | - { 'aula'=>9, 'área'=>2, 'area'=>2, 'avião'=>2, 'armário'=>2, | |
| 24 | - 'A'=>1, 'Á'=>1, 'AB'=>1, 'ÁA'=>1 }, | |
| 23 | + { 'area'=>9, 'área'=>2, 'base'=>2, 'báse' => 3, | |
| 24 | + 'A'=>1, 'Á'=>1, 'zebra'=>1, 'zebrá'=>1 }, | |
| 25 | 25 | :id, |
| 26 | 26 | { :host=>'noosfero.org', :controller=>'test', :action=>'tag' } |
| 27 | 27 | ) |
| 28 | 28 | result = result.split("\n") |
| 29 | - assert_order ['Á', 'ÁA', 'AB', 'área', 'armário', 'aula', 'avião' ], result | |
| 30 | - assert_order ['A', 'AB', 'area', 'armário', 'aula', 'avião' ], result | |
| 29 | + assert_order ['Á', 'área', 'báse', 'zebrá'], result | |
| 30 | + assert_order ['A', 'area', 'base', 'zebra'], result | |
| 31 | 31 | end |
| 32 | 32 | |
| 33 | 33 | end | ... | ... |