[Bps-public-commit] Prophet - A disconnected, replicated p2p database branch, master, updated. bb3dcf77148029b1701c3f2f2cdb1026a57fe957
sartak at bestpractical.com
sartak at bestpractical.com
Thu Feb 5 11:26:54 EST 2009
The branch, master has been updated
via bb3dcf77148029b1701c3f2f2cdb1026a57fe957 (commit)
from 0b8bc237c9f321806fcffa07a323c8dca9f04325 (commit)
Summary of changes:
t/references.t | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit bb3dcf77148029b1701c3f2f2cdb1026a57fe957
Author: Shawn M Moore <sartak at gmail.com>
Date: Thu Feb 5 11:25:58 2009 -0500
The order of records coming out of a collection isn't necessarily the create
order
diff --git a/t/references.t b/t/references.t
index 7a379aa..44cdcde 100644
--- a/t/references.t
+++ b/t/references.t
@@ -35,9 +35,11 @@ $viceroy->create( props => { bugcatcher => $bugcatcher->uuid, species =>
'viceroy' } );
# test collection reference
-my @bugs = @{$bugcatcher->bugs};
-is($bugs[0]->uuid, $monarch->uuid, "monarch butterfly uuids match");
-is($bugs[1]->uuid, $viceroy->uuid, "viceroy butterfly uuids match");
+my @got = sort { $a->uuid cmp $b->uuid } @{$bugcatcher->bugs};
+my @expected = sort { $a->uuid cmp $b->uuid } ($monarch, $viceroy);
+
+is($got[0]->uuid, $expected[0]->uuid, $got[0]->prop('species') . " uuid");
+is($got[1]->uuid, $expected[1]->uuid, $got[1]->prop('species') . " uuid");
# test record reference
is($bugcatcher->net->uuid, $net->uuid);
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list