Sha256: 2d9eeb70735c381000ec2960ea19c71a0453a07fb36387d13c5ac21b18db24ef

Contents?: true

Size: 417 Bytes

Versions: 5

Compression:

Stored size: 417 Bytes

Contents

require 'spec_helper'
module Alf
  module Sql
    describe OrderByTerm, "as_name" do

      subject{ expr.as_name }

      context 'when qualified' do
        let(:expr){ order_by_term(qualified_name('t1', 'a'), "asc") }

        it{ should eq('a') }
      end

      context 'when not qualified' do
        let(:expr){ order_by_term(column_name_a, "asc") }

        it{ should eq('a') }
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-sql-0.16.3 spec/nodes/order_by_term/test_as_name.rb
alf-sql-0.16.2 spec/nodes/order_by_term/test_as_name.rb
alf-sql-0.16.1 spec/nodes/order_by_term/test_as_name.rb
alf-sql-0.16.0 spec/nodes/order_by_term/test_as_name.rb
alf-sql-0.15.0 spec/nodes/order_by_term/test_as_name.rb