aboutsummaryrefslogtreecommitdiffstats
path: root/test/nodes/test_distinct.rb
blob: ffa8a68e6c77cb72f64cb73d2905461df1a983fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'helper'

module Arel
  module Nodes
    describe 'Distinct' do
      describe 'equality' do
        it 'is equal to other distinct nodes' do
          array = [Distinct.new, Distinct.new]
          assert_equal 1, array.uniq.size
        end

        it 'is not equal with other nodes' do
          array = [Distinct.new, Node.new]
          assert_equal 2, array.uniq.size
        end
      end
    end
  end
end