(travis) Remove trial SQLA workaround (no longer on CPAN) - retry another time
[dbsrgits/DBIx-Class.git] / t / 60core.t
index f92159b..77ee4f9 100644 (file)
@@ -387,24 +387,29 @@ lives_ok (sub { my $newlink = $newbook->link}, "stringify to false value doesn't
   $schema->source("Artist")->column_info_from_storage(1);
   $schema->source("Artist")->{_columns_info_loaded} = 0;
 
+  my @undef_default = DBIx::Class::_ENV_::STRESSTEST_COLUMN_INFO_UNAWARE_STORAGE
+    ? ()
+    : ( default_value => undef )
+  ;
+
   is_deeply (
     $schema->source('Artist')->columns_info,
     {
       artistid => {
         data_type => "INTEGER",
-        default_value => undef,
+        @undef_default,
         is_nullable => 0,
         size => undef
       },
       charfield => {
         data_type => "char",
-        default_value => undef,
+        @undef_default,
         is_nullable => 1,
         size => 10
       },
       name => {
         data_type => "varchar",
-        default_value => undef,
+        @undef_default,
         is_nullable => 1,
         is_numeric => 0,
         size => 100
@@ -426,7 +431,7 @@ lives_ok (sub { my $newlink = $newbook->link}, "stringify to false value doesn't
     {
       artistid => {
         data_type => "INTEGER",
-        default_value => undef,
+        @undef_default,
         is_nullable => 0,
         size => undef
       },
@@ -636,4 +641,6 @@ SKIP: {
 
 throws_ok { $schema->resultset} qr/resultset\(\) expects a source name/, 'resultset with no argument throws exception';
 
+throws_ok { $schema->source('Artist')->result_class->new( 'bugger' ) } qr/must be a hashref/;
+
 done_testing;