[Bast-commits] r7302 - DBIx-Class/0.08/trunk/t/inflate

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Tue Aug 11 17:41:01 GMT 2009


Author: ribasushi
Date: 2009-08-11 17:40:59 +0000 (Tue, 11 Aug 2009)
New Revision: 7302

Modified:
   DBIx-Class/0.08/trunk/t/inflate/serialize.t
Log:
Whitespace

Modified: DBIx-Class/0.08/trunk/t/inflate/serialize.t
===================================================================
--- DBIx-Class/0.08/trunk/t/inflate/serialize.t	2009-08-11 15:52:49 UTC (rev 7301)
+++ DBIx-Class/0.08/trunk/t/inflate/serialize.t	2009-08-11 17:40:59 UTC (rev 7302)
@@ -10,13 +10,13 @@
 use Data::Dumper;
 
 my @serializers = (
-    {	module => 'YAML.pm',
-	inflater => sub { YAML::Load (shift) },
-	deflater => sub { die "Expecting a reference" unless (ref $_[0]); YAML::Dump (shift) },
+    { module => 'YAML.pm',
+      inflater => sub { YAML::Load (shift) },
+      deflater => sub { die "Expecting a reference" unless (ref $_[0]); YAML::Dump (shift) },
     },
-    {	module => 'Storable.pm',
-	inflater => sub { Storable::thaw (shift) },
-	deflater => sub { die "Expecting a reference" unless (ref $_[0]); Storable::nfreeze (shift) },
+    { module => 'Storable.pm',
+      inflater => sub { Storable::thaw (shift) },
+      deflater => sub { die "Expecting a reference" unless (ref $_[0]); Storable::nfreeze (shift) },
     },
 );
 
@@ -25,14 +25,13 @@
 foreach my $serializer (@serializers) {
     eval { require $serializer->{module} };
     unless ($@) {
-	$selected = $serializer;
-	last;
+      $selected = $serializer;
+      last;
     }
 }
 
 plan (skip_all => "No suitable serializer found") unless $selected;
 
-plan (tests => 11);
 DBICTest::Schema::Serialized->inflate_column( 'serialized',
     { inflate => $selected->{inflater},
       deflate => $selected->{deflater},
@@ -42,17 +41,17 @@
 
 my $struct_hash = {
     a => 1,
-    b => [ 
+    b => [
         { c => 2 },
     ],
     d => 3,
 };
 
 my $struct_array = [
-    'a', 
-    { 
-	b => 1,
-	c => 2
+    'a',
+    {
+      b => 1,
+      c => 2,
     },
     'd',
 ];
@@ -63,7 +62,6 @@
 #======= testing hashref serialization
 
 my $object = $rs->create( { 
-    id => 1,
     serialized => '',
 } );
 ok($object->update( { serialized => $struct_hash } ), 'hashref deflation');
@@ -71,7 +69,6 @@
 is_deeply($inflated, $struct_hash, 'inflated hash matches original');
 
 $object = $rs->create( { 
-    id => 2,
     serialized => '',
 } );
 eval { $object->set_inflated_column('serialized', $struct_hash) };
@@ -98,3 +95,5 @@
 $object->update;
 
 is_deeply ($rs->first->serialized, { x => 'z' }, 'changes made it to the db' );
+
+done_testing;




More information about the Bast-commits mailing list