@@ -36,15 +36,15 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
3636 assert_line :time_2 , type : 'time' , limit : nil , precision : 2 , scale : nil , default : nil
3737 end
3838 # Character Strings
39- assert_line :char_10 , type : 'char' , limit : 10 , precision : nil , scale : nil , default : "1234567890" , collation : "SQL_Latin1_General_CP1_CI_AS"
40- assert_line :varchar_50 , type : 'varchar' , limit : 50 , precision : nil , scale : nil , default : "test varchar_50" , collation : "SQL_Latin1_General_CP1_CI_AS"
41- assert_line :varchar_max , type : 'varchar_max' , limit : 2147483647 , precision : nil , scale : nil , default : "test varchar_max" , collation : "SQL_Latin1_General_CP1_CI_AS"
42- assert_line :text , type : 'text_basic' , limit : 2147483647 , precision : nil , scale : nil , default : "test text" , collation : "SQL_Latin1_General_CP1_CI_AS"
39+ assert_line :char_10 , type : 'char' , limit : 10 , precision : nil , scale : nil , default : "1234567890" , collation : nil
40+ assert_line :varchar_50 , type : 'varchar' , limit : 50 , precision : nil , scale : nil , default : "test varchar_50" , collation : nil
41+ assert_line :varchar_max , type : 'varchar_max' , limit : 2147483647 , precision : nil , scale : nil , default : "test varchar_max" , collation : nil
42+ assert_line :text , type : 'text_basic' , limit : 2147483647 , precision : nil , scale : nil , default : "test text" , collation : nil
4343 # Unicode Character Strings
44- assert_line :nchar_10 , type : 'nchar' , limit : 10 , precision : nil , scale : nil , default : "12345678åå" , collation : "SQL_Latin1_General_CP1_CI_AS"
45- assert_line :nvarchar_50 , type : 'string' , limit : 50 , precision : nil , scale : nil , default : "test nvarchar_50 åå" , collation : "SQL_Latin1_General_CP1_CI_AS"
46- assert_line :nvarchar_max , type : 'text' , limit : 2147483647 , precision : nil , scale : nil , default : "test nvarchar_max åå" , collation : "SQL_Latin1_General_CP1_CI_AS"
47- assert_line :ntext , type : 'ntext' , limit : 2147483647 , precision : nil , scale : nil , default : "test ntext åå" , collation : "SQL_Latin1_General_CP1_CI_AS"
44+ assert_line :nchar_10 , type : 'nchar' , limit : 10 , precision : nil , scale : nil , default : "12345678åå" , collation : nil
45+ assert_line :nvarchar_50 , type : 'string' , limit : 50 , precision : nil , scale : nil , default : "test nvarchar_50 åå" , collation : nil
46+ assert_line :nvarchar_max , type : 'text' , limit : 2147483647 , precision : nil , scale : nil , default : "test nvarchar_max åå" , collation : nil
47+ assert_line :ntext , type : 'ntext' , limit : 2147483647 , precision : nil , scale : nil , default : "test ntext åå" , collation : nil
4848 # Binary Strings
4949 assert_line :binary_49 , type : 'binary_basic' , limit : 49 , precision : nil , scale : nil , default : nil
5050 assert_line :varbinary_49 , type : 'varbinary' , limit : 49 , precision : nil , scale : nil , default : nil
@@ -125,7 +125,7 @@ class SchemaDumperTestSQLServer < ActiveRecord::TestCase
125125 it 'no id with model driven primary key' do
126126 output = generate_schema_for_table 'sst_no_pk_data'
127127 output . must_match %r{create_table "sst_no_pk_data".*id:\s false.*do}
128- assert_line :name , type : 'string' , limit : nil , default : nil , collation : "SQL_Latin1_General_CP1_CI_AS"
128+ assert_line :name , type : 'string' , limit : nil , default : nil , collation : nil
129129 end
130130
131131
@@ -154,7 +154,7 @@ def line(column_name)
154154 def assert_line ( column_name , options = { } )
155155 line = line ( column_name )
156156 assert line , "Count not find line with column name: #{ column_name . inspect } in schema:\n #{ schema } "
157- [ :type , :limit , :precision , :scale , :default ] . each do |key |
157+ [ :type , :limit , :precision , :scale , :collation , : default] . each do |key |
158158 next unless options . key? ( key )
159159 actual = key == :type ? line . send ( :type_method ) : line . send ( key )
160160 expected = options [ key ]
0 commit comments