diff --git a/test/functional/application_controller_test.rb b/test/functional/application_controller_test.rb index 76df1bb..5a4d504 100644 --- a/test/functional/application_controller_test.rb +++ b/test/functional/application_controller_test.rb @@ -486,8 +486,11 @@ class ApplicationControllerTest < ActionController::TestCase Noosfero::MultiTenancy.expects(:mapping).returns({ 'schema1.com' => 'schema1' }).at_least_once exception = assert_raise(ActiveRecord::StatementInvalid) { get :index } - # we have switched to a new database schema, and whatever table we need don't exist in it - assert_match /PG::UndefinedTable/, exception.message + # we have switched to a new database schema; depending on the PostgreSQL + # version, we will receive either an error message because the schema + # does not exist, or an error saying that whatever table we need can't be + # found. + assert_match /(SET search_path TO schema1|PG::UndefinedTable)/, exception.message end should 'not change postgresql schema if multitenancy is off' do -- libgit2 0.21.2