aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes/test_table_alias.rb
blob: fef24bb19e592b3c36ee00e453f041818b9b0782 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'helper'
require 'ostruct'

module Arel
  module Nodes
    describe 'table alias' do
      it 'has an #engine which delegates to the relation' do
        engine   = Object.new
        relation = OpenStruct.new(:engine => engine)

        node = TableAlias.new relation, :foo
        node.engine.must_equal engine
      end
    end
  end
end