add monotonic
[dbsrgits/DBIx-Class-DeploymentHandler.git] / t / version_storages / standard.t
index aa357ce..f25a9cb 100644 (file)
@@ -6,7 +6,6 @@ use Test::Exception;
 
 use lib 't/lib';
 use DBICDHTest;
-use DBICTest;
 use aliased 'DBIx::Class::DeploymentHandler::VersionStorage::Standard';
 
 use DBICVersion_v1;
@@ -45,17 +44,11 @@ $handler->install();
 ok( $vs->version_storage_is_installed, 'VersionStorage is now installed' );
 
 
-cmp_deeply(
-       [ map +{
-               version     => $_->version,
-               ddl         => $_->ddl,
-               upgrade_sql => $_->upgrade_sql,
-       }, $vs->version_rs->search(undef, {order_by => 'id'})->all],
-       [{
-               version     => '1.0',
-               ddl         => undef,
-               upgrade_sql => undef
-       }],
+ok(
+       eq_array(
+               [ $vs->version_rs->search(undef, {order_by => 'id'})->get_column('version')->all],
+               [ '1.0' ],
+       ),
        'initial version works correctly'
 );
 
@@ -65,21 +58,11 @@ $vs->add_database_version({
 });
 is( $vs->database_version, '2.0', 'database version is 2.0');
 
-cmp_deeply(
-       [ map +{
-               version     => $_->version,
-               ddl         => $_->ddl,
-               upgrade_sql => $_->upgrade_sql,
-       }, $vs->version_rs->search(undef, {order_by => 'id'})->all],
-       [{
-               version     => '1.0',
-               ddl         => undef,
-               upgrade_sql => undef
-       },{
-               version     => '2.0',
-               ddl         => undef,
-               upgrade_sql => undef
-       }],
+ok(
+       eq_array(
+               [ $vs->version_rs->search(undef, {order_by => 'id'})->get_column('version')->all],
+               [ '1.0', '2.0', ],
+       ),
        'adding another version works correctly'
 );