Index: trunk/Nebulous/t/60_client_copy.t
===================================================================
--- trunk/Nebulous/t/60_client_copy.t	(revision 13059)
+++ trunk/Nebulous/t/60_client_copy.t	(revision 13067)
@@ -3,5 +3,5 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 60_client_copy.t,v 1.1 2005-12-03 02:52:31 jhoblitt Exp $
+# $Id: 60_client_copy.t,v 1.2 2007-04-27 23:50:57 jhoblitt Exp $
 
 use strict;
@@ -10,5 +10,5 @@
 use Apache::Test qw( -withtestmore );
 
-plan tests => 8;
+plan tests => 11;
 
 use lib qw( ./t ./lib );
@@ -43,4 +43,21 @@
         proxy => "http://$hostport/nebulous",
     );
+    $neb->create( "foo" );
+
+    ok( $neb->copy( "foo", "foobar", "node01" ), "copied object" );
+
+    my $locations1 = $neb->find_instances( "foobar" );
+    my $locations2 = $neb->find_instances( "foobar" );
+
+    is( scalar @$locations1, 1, "old object has an instances" );
+    is( scalar @$locations2, 1, "new object has an instances" );
+}
+
+Test::Nebulous->setup;
+
+{
+    my $neb = Nebulous::Client->new(
+        proxy => "http://$hostport/nebulous",
+    );
 
     ok( ! $neb->copy( "foo", "foobar" ), "copy non-existant object" );
@@ -59,5 +76,5 @@
     $neb->copy();
 };
-like( $@, qr/2 were expected/, "no params" );
+like( $@, qr/2 - 3 were expected/, "no params" );
 
 Test::Nebulous->setup;
@@ -69,5 +86,5 @@
     $neb->copy( "foo" );
 };
-like( $@, qr/2 were expected/, "not enough params" );
+like( $@, qr/2 - 3 were expected/, "not enough params" );
 
 Test::Nebulous->setup;
@@ -77,7 +94,7 @@
         proxy => "http://$hostport/nebulous",
     );
-    $neb->copy( "foo", "bar", "baz" );
+    $neb->copy( "foo", "bar", "baz", "bong" );
 };
-like( $@, qr/2 were expected/, "too many params" );
+like( $@, qr/2 - 3 were expected/, "too many params" );
 
 Test::Nebulous->cleanup;
