aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-16 08:09:26 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-16 08:09:26 -0800
commitf0139a16c263ba62e7e45d462a4fff411ebf2523 (patch)
tree9f47fcf5c2a6466e50c5ecb19eaa9ea94e0bfb43 /test
parent206ec83ced0097a97f431a8fe20d4fcbd8fdd4d5 (diff)
downloadrails-f0139a16c263ba62e7e45d462a4fff411ebf2523.tar.gz
rails-f0139a16c263ba62e7e45d462a4fff411ebf2523.tar.bz2
rails-f0139a16c263ba62e7e45d462a4fff411ebf2523.zip
returning undefined for unknown column types
Diffstat (limited to 'test')
-rw-r--r--test/test_attributes.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_attributes.rb b/test/test_attributes.rb
index 8fc9327b0f..3654e78314 100644
--- a/test/test_attributes.rb
+++ b/test/test_attributes.rb
@@ -3,6 +3,11 @@ require 'helper'
module Arel
describe 'Attributes' do
describe 'for' do
+ it 'deals with unknown column types' do
+ column = Struct.new(:type).new :crazy
+ Attributes.for(column).must_equal Attributes::Undefined
+ end
+
it 'returns the correct constant for strings' do
[:string, :text, :binary].each do |type|
column = Struct.new(:type).new type