Sha256: fd57fb578f1c8e658970961114cd2962cb161a9d24ccbb6989422e952def4ae6

Contents?: true

Size: 737 Bytes

Versions: 4

Compression:

Stored size: 737 Bytes

Contents

# frozen_string_literal: true

require_relative "helper"

module Arel
  describe "Attributes" do
    it "responds to lower" do
      relation  = Table.new(:users)
      attribute = relation[:foo]
      node      = attribute.lower
      assert_equal "LOWER", node.name
      assert_equal [attribute], node.expressions
    end

    describe "equality" do
      it "is equal with equal ivars" do
        array = [Attribute.new("foo", "bar"), Attribute.new("foo", "bar")]
        assert_equal 1, array.uniq.size
      end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ibm_db-5.5.0-x86-mingw32 test/cases/arel/attributes_test.rb
ibm_db-5.4.1-x86-mingw32 test/cases/arel/attributes_test.rb
ibm_db-5.4.0-x86-mingw32 test/cases/arel/attributes_test.rb
ibm_db-5.3.2-x86-mingw32 test/cases/arel/attributes_test.rb