From 113240e0b75e53b41e3d0837ec53ec594bcd9a28 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 25 Apr 2011 12:12:05 -0700 Subject: adding attribute#lower for lowercasing an attribute --- test/test_attributes.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test_attributes.rb b/test/test_attributes.rb index 3654e78314..010d708859 100644 --- a/test/test_attributes.rb +++ b/test/test_attributes.rb @@ -2,6 +2,14 @@ require '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 'for' do it 'deals with unknown column types' do column = Struct.new(:type).new :crazy -- cgit v1.2.3