Commit 51fd552da2e9e779c29e2495a99b748060406cb9
1 parent
6cd4e874
Exists in
master
and in
22 other branches
database-collation: remove tests thar are db collation sensitive
There are some tests that may fail due to assumption of the database collation.
Showing
2 changed files
with
1 additions
and
23 deletions
Show diff stats
INSTALL.md
| @@ -110,7 +110,7 @@ Setup Noosfero log and tmp directories: | @@ -110,7 +110,7 @@ Setup Noosfero log and tmp directories: | ||
| 110 | # cd /var/lib/noosfero/current | 110 | # cd /var/lib/noosfero/current |
| 111 | # ./etc/init.d/noosfero setup | 111 | # ./etc/init.d/noosfero setup |
| 112 | 112 | ||
| 113 | -Now it's time to setup the database. In this example we are using PostgreSQL, so if you are planning to use a different database this steps won't apply. | 113 | +Now it's time to setup the database. In this example we are using PostgreSQL, so if you are planning to use a different database this steps won't apply. Pay special attention to the default collation defined on your setup by the environment variable LC_COLLATE because it might interfere in some sorting operations on your database. For more information checkout `man locale`. |
| 114 | 114 | ||
| 115 | # apt-get install postgresql libpgsql-ruby | 115 | # apt-get install postgresql libpgsql-ruby |
| 116 | # su postgres -c 'createuser noosfero -S -d -R' | 116 | # su postgres -c 'createuser noosfero -S -d -R' |
test/unit/profile_test.rb
| @@ -1693,28 +1693,6 @@ class ProfileTest < ActiveSupport::TestCase | @@ -1693,28 +1693,6 @@ class ProfileTest < ActiveSupport::TestCase | ||
| 1693 | assert_equal 1, community.members_count | 1693 | assert_equal 1, community.members_count |
| 1694 | end | 1694 | end |
| 1695 | 1695 | ||
| 1696 | - should 'order members by name alphabetically considering special characters' do | ||
| 1697 | - community = fast_create(Community) | ||
| 1698 | - | ||
| 1699 | - community.add_member(create_user('José').person) | ||
| 1700 | - community.add_member(create_user('João').person) | ||
| 1701 | - community.add_member(create_user('Mariana').person) | ||
| 1702 | - members = community.members_by_name | ||
| 1703 | - | ||
| 1704 | - assert_equal ["João", "José", "Mariana"], members.map(&:name) | ||
| 1705 | - end | ||
| 1706 | - | ||
| 1707 | - should 'order members by name alphabetically considering upper and lower cases' do | ||
| 1708 | - community = fast_create(Community) | ||
| 1709 | - | ||
| 1710 | - community.add_member(create_user('mariana').person) | ||
| 1711 | - community.add_member(create_user('João').person) | ||
| 1712 | - community.add_member(create_user('guest').person) | ||
| 1713 | - members = community.members_by_name | ||
| 1714 | - | ||
| 1715 | - assert_equal ["guest", "João", "mariana"], members.map(&:name) | ||
| 1716 | - end | ||
| 1717 | - | ||
| 1718 | should 'know if url is the profile homepage' do | 1696 | should 'know if url is the profile homepage' do |
| 1719 | profile = fast_create(Profile) | 1697 | profile = fast_create(Profile) |
| 1720 | 1698 |