From 6c2a0675f11a9b5b8e88ed7dbccd65cb51be8029 Mon Sep 17 00:00:00 2001 From: Rizwan Reza Date: Sun, 28 Mar 2010 11:01:15 +0430 Subject: When creating database with rake, create schemas in schema_search_path if it doesn't exist. --- activerecord/test/cases/active_schema_test_postgresql.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activerecord/test/cases/active_schema_test_postgresql.rb') diff --git a/activerecord/test/cases/active_schema_test_postgresql.rb b/activerecord/test/cases/active_schema_test_postgresql.rb index af80f724f2..67c662d694 100644 --- a/activerecord/test/cases/active_schema_test_postgresql.rb +++ b/activerecord/test/cases/active_schema_test_postgresql.rb @@ -17,6 +17,13 @@ class PostgresqlActiveSchemaTest < Test::Unit::TestCase assert_equal %(CREATE DATABASE "aimonetti" ENCODING = 'latin1'), create_database(:aimonetti, :encoding => :latin1) end + def test_create_schema + assert_equal %(CREATE SCHEMA "rizwan" AUTHORIZATION "postgres"), create_schema(:rizwan, :postgres) + end + + def test_drop_schema + assert_equal %(DROP SCHEMA "rizwan"), drop_schema(:rizwan) + end private def method_missing(method_symbol, *arguments) ActiveRecord::Base.connection.send(method_symbol, *arguments) -- cgit v1.2.3