aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/arel/nodes/comment_test.rb
blob: bf5eaf4c5acab34dae346f0ecb8fc57276c93180 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require_relative "../helper"
require "yaml"

module Arel
  module Nodes
    class CommentTest < Arel::Spec
      describe "equality" do
        it "is equal with equal contents" do
          array = [Comment.new(["foo"]), Comment.new(["foo"])]
          assert_equal 1, array.uniq.size
        end

        it "is not equal with different contents" do
          array = [Comment.new(["foo"]), Comment.new(["bar"])]
          assert_equal 2, array.uniq.size
        end
      end
    end
  end
end