1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Revert "checking in the abstractions for valid type checking:"

This reverts commit c321b309a9.

Conflicts:
	activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
	activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb

Reason: failing test

  1) Error:
test_valid_column(ActiveRecord::ConnectionAdapters::SQLite3AdapterTest):
NoMethodError: undefined method `column' for
    test/cases/adapters/sqlite3/sqlite3_adapter_test.rb:29:in
`test_valid_column'
This commit is contained in:
Jon Leighton 2013-02-15 16:19:08 +00:00
parent 2f997797a5
commit c65b076328
4 changed files with 1 additions and 28 deletions

View file

@ -118,7 +118,7 @@ HEADER
# then dump all non-primary key columns
column_specs = columns.map do |column|
raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" unless @connection.valid_type?(column.type)
raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" if @types[column.type].nil?
next if column.name == pk
@connection.column_spec(column, @types)
end.compact

View file

@ -16,15 +16,6 @@ module ActiveRecord
eosql
end
def test_valid_column
column = @conn.column('ex').find { |col| col.name == 'id' }
assert @conn.valid_type?(column.type)
end
def test_invalid_column
assert !@conn.valid_type?(:foobar)
end
def test_client_encoding
assert_equal Encoding::UTF_8, @conn.client_encoding
end

View file

@ -10,15 +10,6 @@ module ActiveRecord
@connection.exec_query('create table ex(id serial primary key, number integer, data character varying(255))')
end
def test_valid_column
column = @connection.column('ex').find { |col| col.name == 'id' }
assert @connection.valid_type?(column.type)
end
def test_invalid_column
assert !@connection.valid_type?(:foobar)
end
def test_primary_key
assert_equal 'id', @connection.primary_key('ex')
end

View file

@ -25,15 +25,6 @@ module ActiveRecord
@conn.intercepted = true
end
def test_valid_column
column = @conn.column('items').find { |col| col.name == 'id' }
assert @conn.valid_type?(column.type)
end
def test_invalid_column
assert @conn.valid_type?(:foobar)
end
def teardown
@conn.intercepted = false
@conn.logged = []