From: Arthur Axel 'fREW' Schmidt Date: Thu, 16 Feb 2012 00:05:37 +0000 (-0600) Subject: add basic unit tests for MigrationSchema X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=087d8c8a1a623567fc60a3d61cc8cff0bfdb90be;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git add basic unit tests for MigrationSchema --- diff --git a/t/migration_schema/from_current.t b/t/migration_schema/from_current.t new file mode 100644 index 0000000..14fd8ac --- /dev/null +++ b/t/migration_schema/from_current.t @@ -0,0 +1,20 @@ +#!perl + +use strict; +use warnings; + +use Test::More; + +use lib 't/lib'; + +use aliased 'DBIx::Class::DeploymentHandler::MigrationSchema::FromCurrent'; + +my $ref = \''; +my $ms = FromCurrent->new({ + schema => $ref, +}); + +ok($ms, 'MigrationSchema gets instantiated'); +is($ref, $ms->migration_schema, 'migration schema correctly passed through schema'); + +done_testing; diff --git a/t/migration_schema/schema_loader.t b/t/migration_schema/schema_loader.t new file mode 100644 index 0000000..8aa3cdd --- /dev/null +++ b/t/migration_schema/schema_loader.t @@ -0,0 +1,21 @@ +#!perl + +use strict; +use warnings; + +use Test::More; + +use lib 't/lib'; + +use aliased 'DBIx::Class::DeploymentHandler::MigrationSchema::SchemaLoader'; + +my $ref = \''; +my $ms = SchemaLoader->new({ + schema => $ref, +}); + +ok($ms, 'MigrationSchema gets instantiated'); + +note('doing anything else in this test is way hard. We just test this in the integration tests'); + +done_testing;