Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 92a3c487bb
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (24 sloc) 0.802 kb
require "cases/helper"
module ActiveRecord
class PostgresqlConnectionTest < ActiveRecord::TestCase
class NonExistentTable < ActiveRecord::Base
end
def setup
super
@connection = ActiveRecord::Base.connection
end
def test_encoding
assert_not_nil @connection.encoding
end
# Ensure, we can set connection params using the example of Generic
# Query Optimizer (geqo). It is 'on' per default.
def test_connection_options
params = ActiveRecord::Base.connection_config.dup
params[:options] = "-c geqo=off"
NonExistentTable.establish_connection(params)
# Verify the connection param has been applied.
expect = NonExistentTable.connection.query('show geqo').first.first
assert_equal 'off', expect
end
end
end
Jump to Line
Something went wrong with that request. Please try again.