X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F02-instantiation-wo-component.t;h=0eabb148d385a4d1521791679b24cd42bddbc4be;hb=27da120a50905a6c6d660f05a7034bba6f38fdc1;hp=fbf5723a272516f58231823ae2699369155991ad;hpb=f3b5161e466df2a94f2704177f0173e7d940c4d5;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git diff --git a/t/02-instantiation-wo-component.t b/t/02-instantiation-wo-component.t index fbf5723..0eabb14 100644 --- a/t/02-instantiation-wo-component.t +++ b/t/02-instantiation-wo-component.t @@ -40,7 +40,7 @@ VERSION1: { bar => 'frew', }) } 'schema not deployed'; - $handler->install; + $handler->install({ version => 1 }); dies_ok { $handler->install; } 'cannot install twice'; @@ -55,6 +55,20 @@ VERSION2: { use_ok 'DBICVersion_v2'; my $s = DBICVersion::Schema->connect(@connection); $DBICVersion::Schema::VERSION = 2; + subtest 'bug deploying first version' => sub { + my $dbh = DBICDHTest::dbh(); + my @connection = (sub { $dbh }, { ignore_version => 1 }); + my $s = DBICVersion::Schema->connect(@connection); + + my $handler = DH->new({ + script_directory => $sql_dir, + schema => $s, + databases => 'SQLite', + }); + $handler->install({ version => 1 }); + is($handler->database_version, 1, 'correctly set version to 1'); + }; + ok($s, 'DBICVersion::Schema 2 instantiates correctly'); my $handler = DH->new({ script_directory => $sql_dir,