[Git][noosfero/noosfero][master] Adjust multitenancy test for different PostgreSQL versions
Antonio Terceiro
gitlab at mg.gitlab.com
Tue Dec 1 21:56:38 BRST 2015
Antonio Terceiro pushed to branch master at Noosfero / noosfero
Commits:
dc115f26 by Antonio Terceiro at 2015-12-01T21:55:23Z
Adjust multitenancy test for different PostgreSQL versions
- - - - -
1 changed file:
- test/functional/application_controller_test.rb
Changes:
=====================================
test/functional/application_controller_test.rb
=====================================
--- 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
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/dc115f261b0131d0487b034e08eef385b5eb01eb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20151201/2a3f404e/attachment.html>
More information about the Noosfero-dev
mailing list