diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-22 03:26:21 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-22 03:26:21 +0000 |
commit | 9a947af0e79cfb8692eb7e5ae94c1b8c40756f49 (patch) | |
tree | a112288923bf4c504755c128f157a56a2afccdfc /activerecord/test/cases | |
parent | 01b77da8da50aa4fec91b690adecab005f365317 (diff) | |
download | rails-9a947af0e79cfb8692eb7e5ae94c1b8c40756f49.tar.gz rails-9a947af0e79cfb8692eb7e5ae94c1b8c40756f49.tar.bz2 rails-9a947af0e79cfb8692eb7e5ae94c1b8c40756f49.zip |
PostgreSQL: support server versions 7.4 through 8.0 and the ruby-pg driver. Closes #11127
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/defaults_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/schema_authorization_test_postgresql.rb | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/activerecord/test/cases/defaults_test.rb b/activerecord/test/cases/defaults_test.rb index ac133da47a..bd19ffcc29 100644 --- a/activerecord/test/cases/defaults_test.rb +++ b/activerecord/test/cases/defaults_test.rb @@ -61,7 +61,9 @@ class DefaultTest < ActiveRecord::TestCase if current_adapter?(:PostgreSQLAdapter) def test_multiline_default_text - assert_equal "--- []\n\n", Default.columns_hash['multiline_default'].default + # older postgres versions represent the default with escapes ("\\012" for a newline) + assert ( "--- []\n\n" == Default.columns_hash['multiline_default'].default || + "--- []\\012\\012" == Default.columns_hash['multiline_default'].default) end end end diff --git a/activerecord/test/cases/schema_authorization_test_postgresql.rb b/activerecord/test/cases/schema_authorization_test_postgresql.rb index 61838d4bf7..7a0796ef53 100644 --- a/activerecord/test/cases/schema_authorization_test_postgresql.rb +++ b/activerecord/test/cases/schema_authorization_test_postgresql.rb @@ -18,7 +18,7 @@ class SchemaAuthorizationTest < ActiveRecord::TestCase @connection.execute "SET search_path TO '$user',public" set_session_auth USERS.each do |u| - @connection.execute "CREATE ROLE #{u}" + @connection.execute "CREATE USER #{u}" @connection.execute "CREATE SCHEMA AUTHORIZATION #{u}" set_session_auth u @connection.execute "CREATE TABLE #{TABLE_NAME} (#{COLUMNS.join(',')})" @@ -32,7 +32,7 @@ class SchemaAuthorizationTest < ActiveRecord::TestCase @connection.execute "RESET search_path" USERS.each do |u| @connection.execute "DROP SCHEMA #{u} CASCADE" - @connection.execute "DROP ROLE #{u}" + @connection.execute "DROP USER #{u}" end end |