[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. af321f97cc3ab897e76e702071a128a269c50de3

sartak at bestpractical.com sartak at bestpractical.com
Thu Feb 5 11:30:29 EST 2009


The branch, master has been updated
       via  af321f97cc3ab897e76e702071a128a269c50de3 (commit)
      from  bb3dcf77148029b1701c3f2f2cdb1026a57fe957 (commit)

Summary of changes:
 t/references.t |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit af321f97cc3ab897e76e702071a128a269c50de3
Author: Shawn M Moore <sartak at gmail.com>
Date:   Thu Feb 5 11:30:09 2009 -0500

    Generalize the uuid comparison

diff --git a/t/references.t b/t/references.t
index 44cdcde..5e80e35 100644
--- a/t/references.t
+++ b/t/references.t
@@ -1,6 +1,6 @@
 use warnings;
 use strict;
-use Test::More tests => 8;
+use Test::More tests => 7;
 use lib 't/lib';
 
 use File::Temp qw'tempdir';
@@ -35,11 +35,15 @@ $viceroy->create( props => { bugcatcher => $bugcatcher->uuid, species =>
         'viceroy' } );
 
 # test collection reference
-my @got      = sort { $a->uuid cmp $b->uuid } @{$bugcatcher->bugs};
-my @expected = sort { $a->uuid cmp $b->uuid } ($monarch, $viceroy);
+my @got = map { $_->uuid }
+          sort { $a->uuid cmp $b->uuid }
+          @{$bugcatcher->bugs};
 
-is($got[0]->uuid, $expected[0]->uuid, $got[0]->prop('species') . " uuid");
-is($got[1]->uuid, $expected[1]->uuid, $got[1]->prop('species') . " uuid");
+my @expected = map { $_->uuid }
+               sort { $a->uuid cmp $b->uuid }
+               ($monarch, $viceroy);
+
+is_deeply(\@got, \@expected, "collection's record uuids match");
 
 # test record reference
 is($bugcatcher->net->uuid, $net->uuid);

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list