Sha256: a15caca3308af81b15275a73a02c09a66210e6514b72d0da91d5b9648e1ea083
Contents?: true
Size: 626 Bytes
Versions: 3
Compression:
Stored size: 626 Bytes
Contents
require 'abstract_unit' require 'fixtures/topic' class TestColumnAlias < Test::Unit::TestCase def test_column_alias topic = Topic.find(1) if ActiveRecord::ConnectionAdapters.const_defined? :OracleAdapter if ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::OracleAdapter) records = topic.connection.select_all("SELECT id AS pk FROM topics WHERE ROWNUM < 2") assert_equal(records[0].keys[0], "pk") end else records = topic.connection.select_all("SELECT id AS pk FROM topics LIMIT 1") assert_equal(records[0].keys[0], "pk") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
activerecord-1.9.0 | test/column_alias_test.rb |
activerecord-1.7.0 | test/column_alias_test.rb |
activerecord-1.8.0 | test/column_alias_test.rb |