[Bps-public-commit] r15625 - in Prophet/trunk: .

jesse at bestpractical.com jesse at bestpractical.com
Thu Aug 28 21:16:51 EDT 2008


Author: jesse
Date: Thu Aug 28 21:16:46 2008
New Revision: 15625

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/t/simple-push.t

Log:
 r44651 at 68-246-110-196 (orig r15573):  jesse | 2008-08-27 18:18:53 -0700
  r44638 at 192:  jesse | 2008-08-27 16:50:24 -0700
  test updates to keep pace with api deprecation
 


Modified: Prophet/trunk/t/simple-push.t
==============================================================================
--- Prophet/trunk/t/simple-push.t	(original)
+++ Prophet/trunk/t/simple-push.t	Thu Aug 28 21:16:46 2008
@@ -118,20 +118,28 @@
     }
 };
 
-$changesets = $bob->new_changesets_for($alice, force => 1);
+my $new_changesets;
+    $bob->traverse_new_changesets( for => $alice, force => 1,
+            callback => sub {
+                my $cs = shift;
+                return unless $cs->has_changes,
+                push @{$new_changesets}, $cs->as_hash;
+            }
+        
+        
+    );
 
-my @changes = map { $_->as_hash } grep { $_->has_changes } @$changesets;
 
-is( delete $changes[0]->{'sequence_no'}, delete $changes[0]->{'original_sequence_no'});
+is( delete $new_changesets->[0]->{'sequence_no'}, delete $new_changesets->[0]->{'original_sequence_no'});
 
 is_deeply(
-    \@changes,
+    $new_changesets,
     [   {  
         
         #     'sequence_no'          => 4,  # the number varies based on replica type
         #    'original_sequence_no' => 4,
             'creator'              => 'bob',
-            'created'              => $changes[0]->{created},
+            'created'              => $new_changesets->[0]->{created},
             'original_source_uuid' => replica_uuid_for('bob'),
             'is_resolution'        => undef,
             'source_uuid'          => replica_uuid_for('bob'),



More information about the Bps-public-commit mailing list