[Bps-public-commit] r11422 - in SVN-PropDB: .
jesse at bestpractical.com
jesse at bestpractical.com
Thu Apr 3 01:57:10 EDT 2008
Author: jesse
Date: Thu Apr 3 01:57:09 2008
New Revision: 11422
Modified:
SVN-PropDB/ (props changed)
SVN-PropDB/t/simple-push.t
Log:
r29037 at 68-246-127-56: jesse | 2008-04-02 19:56:46 -1000
* bob-last-changeset tests
Modified: SVN-PropDB/t/simple-push.t
==============================================================================
--- SVN-PropDB/t/simple-push.t (original)
+++ SVN-PropDB/t/simple-push.t Thu Apr 3 01:57:09 2008
@@ -39,13 +39,49 @@
run_ok( 'prophet-merge', [ '--from', repo_uri_for('bob'), '--to', repo_uri_for('alice') ], "Sync ran ok!" );
};
+my $last_id;
+
as_bob {
- run_ok( 'prophet-node-create', [qw(--type Bug --status new --from bob )], "Created a record as alice" );
+ run_ok( 'prophet-node-create', [qw(--type Bug --status new --from bob )], "Created a record as bob" );
+ my ($ret,$stdout,$stderr) = run_script('prophet-node-search' ,[qw(--type Bug --regex new)]);
+ if ($stdout =~ /^(.*?)\s/) {
+ $last_id = $1;
+ }
};
$changesets = $bob->new_changesets_for($alice);
-warn Dumper($changesets);
+
+my @changes = map {$_->as_hash} @$changesets;
+
+is_deeply(\@changes, [{
+ 'sequence_no' => 4,
+ 'original_sequence_no' => 4,
+ 'original_source_uuid' => replica_uuid_for('bob'),
+ 'is_resolution' => undef,
+ 'source_uuid' => replica_uuid_for('bob'),
+ 'changes' => {
+ $last_id => {
+ 'change_type' => 'add_file',
+ 'prop_changes' => {
+ 'from' => {
+ 'new_value' => 'bob',
+ 'old_value' => undef
+ },
+ 'status' => {
+ 'new_value' => 'new',
+ 'old_value' => undef
+ }
+ },
+ 'node_type' => 'Bug'
+ }
+ },
+ 'is_nullification' => undef,
+ 'is_empty' => 0
+ }
+ ]);
+
+
__END__
as_alice {
More information about the Bps-public-commit
mailing list