1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/column_alias_test.rb

13 lines
293 B
Ruby

# frozen_string_literal: true
require "cases/helper"
require "models/topic"
class TestColumnAlias < ActiveRecord::TestCase
fixtures :topics
def test_column_alias
records = Topic.connection.select_all("SELECT id AS pk FROM topics")
assert_equal ["pk"], records.columns
end
end