Sha256: 11172e2e993e1c6d0aec6246c43c2f3d7c9bbfc37445b3753c5ed95aa7078c95
Contents?: true
Size: 438 Bytes
Versions: 123
Compression:
Stored size: 438 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
123 entries across 120 versions & 23 rubygems