From: Rafael Kitover Date: Mon, 10 May 2010 16:11:07 +0000 (-0400) Subject: fix MSSQL extra tests X-Git-Tag: 0.07000~24 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16773d6db5807936b24e4c26624797b0a1fab32f;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix MSSQL extra tests --- diff --git a/t/16mssql_common.t b/t/16mssql_common.t index 305fe5b..79a9b06 100644 --- a/t/16mssql_common.t +++ b/t/16mssql_common.t @@ -121,6 +121,7 @@ my $tester = dbixcsl_common_tests->new( # other types timestamp => { data_type => 'timestamp', inflate_datetime => 0 }, + rowversion => { data_type => 'rowversion' }, uniqueidentifier => { data_type => 'uniqueidentifier' }, hierarchyid => { data_type => 'hierarchyid' }, sql_variant => { data_type => 'sql_variant' }, @@ -214,11 +215,18 @@ my $tester = dbixcsl_common_tests->new( lives_and { my $five_row = $schema->resultset($monikers->{mssql_loader_test5})->new_result({}); - $five_row->foocol(1); - $five_row->barcol(2); + + if ($schema->_loader->preserve_case) { + $five_row->foo_col(1); + $five_row->bar_col(2); + } + else { + $five_row->foocol(1); + $five_row->barcol(2); + } $five_row->insert; - my $six_row = $five_row->create_related('mssql_loader_test6s', {}); + my $six_row = $five_row->create_related('mssql_loader_test6s', {}); is $six_row->five->id, 1; } 'relationships for mixed-case tables/columns detected'; diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index e4aa0d2..c6de223 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -1665,6 +1665,7 @@ sub _custom_column_info { my %DATA_TYPE_MULTI_TABLE_OVERRIDES = ( oracle => qr/\blong\b/, + mssql => qr/\b(?:timestamp|rowversion)\b/, ); sub setup_data_type_tests {