@@ -66,7 +66,7 @@ def setup
6666 should 'have correct simplified types' do
6767 assert_equal :string , @char . type
6868 assert_equal :string , @char10 . type
69- if sqlserver_2005?
69+ if sqlserver_2005? || sqlserver_2008?
7070 assert_equal :text , @varcharmax . type , @varcharmax . inspect
7171 assert_equal :text , @varcharmax10 . type , @varcharmax10 . inspect
7272 end
@@ -75,7 +75,7 @@ def setup
7575 should 'have correct #sql_type per schema definition' do
7676 assert_equal 'char(1)' , @char . sql_type , 'Specifing a char type with no limit is 1 by SQL Server standards.'
7777 assert_equal 'char(10)' , @char10 . sql_type , @char10 . inspect
78- if sqlserver_2005?
78+ if sqlserver_2005? || sqlserver_2008?
7979 assert_equal 'varchar(max)' , @varcharmax . sql_type , 'A -1 limit should be converted to max (max) type.'
8080 assert_equal 'varchar(max)' , @varcharmax10 . sql_type , 'A -1 limit should be converted to max (max) type.'
8181 end
@@ -84,7 +84,7 @@ def setup
8484 should 'have correct #limit per schema definition' do
8585 assert_equal 1 , @char . limit
8686 assert_equal 10 , @char10 . limit
87- if sqlserver_2005?
87+ if sqlserver_2005? || sqlserver_2008?
8888 assert_equal nil , @varcharmax . limit , 'Limits on max types are moot and we should let rails know that.'
8989 assert_equal nil , @varcharmax10 . limit , 'Limits on max types are moot and we should let rails know that.'
9090 end
@@ -119,7 +119,7 @@ def setup
119119 assert_equal :text , @ntext10 . type
120120 assert_equal :string , @nchar10 . type
121121 assert_equal :string , @nvarchar100 . type
122- if sqlserver_2005?
122+ if sqlserver_2005? || sqlserver_2008?
123123 assert_equal :text , @nvarcharmax . type , @nvarcharmax . inspect
124124 assert_equal :text , @nvarcharmax10 . type , @nvarcharmax10 . inspect
125125 end
@@ -132,7 +132,7 @@ def setup
132132 assert_equal 'ntext' , @ntext10 . sql_type , 'Even a next with a limit of 10 specified will mean nothing.'
133133 assert_equal 'nchar(10)' , @nchar10 . sql_type , 'An nchar with a limit of 10 needs to have it show up here.'
134134 assert_equal 'nvarchar(100)' , @nvarchar100 . sql_type , 'An nvarchar with a specified limit of 100 needs to show it.'
135- if sqlserver_2005?
135+ if sqlserver_2005? || sqlserver_2008?
136136 assert_equal 'nvarchar(max)' , @nvarcharmax . sql_type , 'A -1 limit should be converted to max (max) type.'
137137 assert_equal 'nvarchar(max)' , @nvarcharmax10 . sql_type , 'A -1 limit should be converted to max (max) type.'
138138 end
@@ -144,7 +144,7 @@ def setup
144144 assert_equal nil , @ntext . limit , 'An ntext column limit is moot, it is a fixed variable length'
145145 assert_equal 10 , @nchar10 . limit
146146 assert_equal 100 , @nvarchar100 . limit
147- if sqlserver_2005?
147+ if sqlserver_2005? || sqlserver_2008?
148148 assert_equal nil , @nvarcharmax . limit , 'Limits on max types are moot and we should let rails know that.'
149149 assert_equal nil , @nvarcharmax10 . limit , 'Limits on max types are moot and we should let rails know that.'
150150 end
0 commit comments