aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/view_test.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-04-13 01:51:52 +0930
committerGitHub <noreply@github.com>2017-04-13 01:51:52 +0930
commit0eb21874cb89dc5ca42945111b4e4ae94106b3e5 (patch)
treebf2fbbe92b154f4cca7a2a70abd6eb2d6d496e5e /activerecord/test/cases/view_test.rb
parent2b4583f2a2ef94bc8c046e36e2b62ec642bbfb41 (diff)
parent7384771dd0652ec4d82c0ad16522a87102316aee (diff)
downloadrails-0eb21874cb89dc5ca42945111b4e4ae94106b3e5.tar.gz
rails-0eb21874cb89dc5ca42945111b4e4ae94106b3e5.tar.bz2
rails-0eb21874cb89dc5ca42945111b4e4ae94106b3e5.zip
Merge pull request #28740 from matthewd/old-postgres
Use a query that's compatible with PostgreSQL 9.2
Diffstat (limited to 'activerecord/test/cases/view_test.rb')
-rw-r--r--activerecord/test/cases/view_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/view_test.rb b/activerecord/test/cases/view_test.rb
index 07288568e8..1d21a2454f 100644
--- a/activerecord/test/cases/view_test.rb
+++ b/activerecord/test/cases/view_test.rb
@@ -154,7 +154,9 @@ if ActiveRecord::Base.connection.supports_views?
end
# sqlite dose not support CREATE, INSERT, and DELETE for VIEW
- if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter, :SQLServerAdapter)
+ if current_adapter?(:Mysql2Adapter, :SQLServerAdapter) ||
+ current_adapter?(:PostgreSQLAdapter) && ActiveRecord::Base.connection.postgresql_version >= 90300
+
class UpdateableViewTest < ActiveRecord::TestCase
self.use_transactional_tests = false
fixtures :books