add basic unit tests for MigrationSchema
Arthur Axel 'fREW' Schmidt [Thu, 16 Feb 2012 00:05:37 +0000 (18:05 -0600)]
t/migration_schema/from_current.t [new file with mode: 0644]
t/migration_schema/schema_loader.t [new file with mode: 0644]

diff --git a/t/migration_schema/from_current.t b/t/migration_schema/from_current.t
new file mode 100644 (file)
index 0000000..14fd8ac
--- /dev/null
@@ -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 (file)
index 0000000..8aa3cdd
--- /dev/null
@@ -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;