aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-25 12:12:05 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-25 12:12:05 -0700
commit113240e0b75e53b41e3d0837ec53ec594bcd9a28 (patch)
tree60b454b7008a06ae1a8946ffed0b542afa3cfb16 /test
parent30c7f0e4b365c85b7a910a0553ed936be56b9c4b (diff)
downloadrails-113240e0b75e53b41e3d0837ec53ec594bcd9a28.tar.gz
rails-113240e0b75e53b41e3d0837ec53ec594bcd9a28.tar.bz2
rails-113240e0b75e53b41e3d0837ec53ec594bcd9a28.zip
adding attribute#lower for lowercasing an attribute
Diffstat (limited to 'test')
-rw-r--r--test/test_attributes.rb8
1 files changed, 8 insertions, 0 deletions
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