Massive cleanup of DateTime test dependencies, other interim
[dbsrgits/DBIx-Class.git] / t / 99dbic_sqlt_parser.t
index 7487c72..61202b7 100644 (file)
@@ -3,9 +3,6 @@ use warnings;
 
 use Test::More;
 use Test::Exception;
-use lib qw(t/lib);
-use DBICTest;
-use DBICTest::Schema;
 use Scalar::Util ();
 
 BEGIN {
@@ -15,15 +12,24 @@ BEGIN {
     unless DBIx::Class::Optional::Dependencies->req_ok_for ('deploy')
 }
 
+use lib qw(t/lib);
+use DBICTest;
+use DBICTest::Schema;
+
 # Test for SQLT-related leaks
 {
   my $s = DBICTest::Schema->clone;
-  create_schema ({ schema => $s });
+  my $sqlt_schema = create_schema ({ schema => $s });
   Scalar::Util::weaken ($s);
 
   ok (!$s, 'Schema not leaked');
+
+  isa_ok ($sqlt_schema, 'SQL::Translator::Schema', 'SQLT schema object produced');
 }
 
+# make sure classname-style works
+lives_ok { isa_ok (create_schema ({ schema => 'DBICTest::Schema' }), 'SQL::Translator::Schema', 'SQLT schema object produced') };
+
 
 my $schema = DBICTest->init_schema();
 # Dummy was yanked out by the sqlt hook test