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

sartak at bestpractical.com sartak at bestpractical.com
Sat May 17 03:37:41 EDT 2008


Author: sartak
Date: Sat May 17 03:37:41 2008
New Revision: 12423

Added:
   Prophet/trunk/t/delete.t
Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/MANIFEST

Log:
 r56127 at onn:  sartak | 2008-05-17 03:37:34 -0400
 Add t/delete.t which tests the explodey Record->delete_prop


Modified: Prophet/trunk/MANIFEST
==============================================================================
--- Prophet/trunk/MANIFEST	(original)
+++ Prophet/trunk/MANIFEST	Sat May 17 03:37:41 2008
@@ -23,6 +23,7 @@
 lib/Prophet/ChangeSet.pm
 lib/Prophet/CLI.pm
 lib/Prophet/Collection.pm
+lib/Prophet/Config.pm
 lib/Prophet/Conflict.pm
 lib/Prophet/ConflictingChange.pm
 lib/Prophet/ConflictingPropChange.pm
@@ -60,6 +61,7 @@
 t/create-conflict.t
 t/create.t
 t/delete-delete-conflict.t
+t/delete.t
 t/edit.t
 t/export.t
 t/generalized_sync_n_merge.t

Added: Prophet/trunk/t/delete.t
==============================================================================
--- (empty file)
+++ Prophet/trunk/t/delete.t	Sat May 17 03:37:41 2008
@@ -0,0 +1,21 @@
+use warnings;
+use strict;
+use Test::More tests => 5;
+
+use File::Temp qw'tempdir';
+
+use_ok('Prophet::CLI');
+$ENV{'PROPHET_REPO'} = tempdir( CLEANUP => 0 ) . '/repo-' . $$;
+my $cli = Prophet::CLI->new();
+my $cxn = $cli->app_handle->handle;
+
+my $record = Prophet::Record->new( handle => $cxn, type => 'Person' );
+my $uuid = $record->create( props => { name => 'Jesse', age => 31 } );
+ok($uuid, "got a record");
+is( $record->prop('age'), 31 );
+$record->set_prop( name => 'age', value => 32 );
+is( $record->prop('age'), 32 );
+
+$record->delete_prop(name => 'name');
+is($record->prop('name'), undef, "no more name");
+



More information about the Bps-public-commit mailing list