X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F99dbic_sqlt_parser.t;h=5ba72a82e728303da16c49e2aa7e35eb97baf6a8;hb=fa394969469fd18a6d99798ae0769e160c7e0e56;hp=628f3cfdf6f7af5fc785bd8017807330d59a3694;hpb=c49ff5072c30f7667c267ae232b7d4ec57fa8933;p=dbsrgits%2FDBIx-Class.git diff --git a/t/99dbic_sqlt_parser.t b/t/99dbic_sqlt_parser.t index 628f3cf..5ba72a8 100644 --- a/t/99dbic_sqlt_parser.t +++ b/t/99dbic_sqlt_parser.t @@ -9,21 +9,26 @@ use DBICTest::Schema; use Scalar::Util (); BEGIN { - require DBIx::Class::Storage::DBI; + require DBIx::Class; plan skip_all => - 'Test needs SQL::Translator ' . DBIx::Class::Storage::DBI->_sqlt_minimum_version - if not DBIx::Class::Storage::DBI->_sqlt_version_ok; + 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('deploy') + unless DBIx::Class::Optional::Dependencies->req_ok_for ('deploy') } # 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