Sha256: cbc43f398c2aff1e78934f320970588b712ea43fbe2aa10418fd6bd68308992c
Contents?: true
Size: 455 Bytes
Versions: 8
Compression:
Stored size: 455 Bytes
Contents
require "cases/helper" require 'models/topic' class TestColumnAlias < ActiveRecord::TestCase fixtures :topics QUERY = if 'Oracle' == ActiveRecord::Base.connection.adapter_name 'SELECT id AS pk FROM topics WHERE ROWNUM < 2' else 'SELECT id AS pk FROM topics' end def test_column_alias records = Topic.connection.select_all(QUERY) assert_equal 'pk', records[0].keys[0] end end
Version data entries
8 entries across 8 versions & 1 rubygems