Sha256: 3c6878c90392c5356b7a4b79edaf61e8b4f653495dc0b8e9e13ee52429cd4057
Contents?: true
Size: 437 Bytes
Versions: 6
Compression:
Stored size: 437 Bytes
Contents
# frozen_string_literal: true 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
6 entries across 6 versions & 2 rubygems