X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F99dbic_sqlt_parser.t;h=61202b76462e44990bff5a46eec76b2092d03e70;hb=68de943862f06cabd397d2e74d12cd9cdc999779;hp=7487c725365cc314f98ae85791ec3d72f96f1d3f;hpb=2527233b404455c2114f90da8041f42cd957f541;p=dbsrgits%2FDBIx-Class.git diff --git a/t/99dbic_sqlt_parser.t b/t/99dbic_sqlt_parser.t index 7487c72..61202b7 100644 --- a/t/99dbic_sqlt_parser.t +++ b/t/99dbic_sqlt_parser.t @@ -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