aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/column_alias_test.rb
blob: 06a0a7f3b0342e7fb137e294fda5ded4b0b4df8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
require 'abstract_unit'
require 'fixtures/topic'

class TestColumnAlias < Test::Unit::TestCase

  def test_column_alias
    topic = Topic.find(1)
    records = topic.connection.select_all("SELECT id AS pk FROM topics LIMIT 1")
    assert_equal(records[0].keys[0], "pk")
  end
  
end