Changeset 24440 for trunk/Nebulous/t/59_client_delete.t
- Timestamp:
- Jun 16, 2009, 2:33:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/Nebulous/t/59_client_delete.t (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/t/59_client_delete.t
r18858 r24440 10 10 use Apache::Test qw( -withtestmore ); 11 11 12 plan tests => 9;12 plan tests => 13; 13 13 14 14 use lib qw( ./t ./lib ); … … 26 26 proxy => "http://$hostport/nebulous", 27 27 ); 28 $neb->create( "foo" );28 my $uri = $neb->create( "foo" ); 29 29 30 30 ok( $neb->delete( "foo" ), "delete object" ); 31 32 ok( ! -e _get_file_path($uri), "deleted file" ); 31 33 32 34 my $locations = $neb->find_instances( "foo" ); … … 76 78 } 77 79 80 # force flag 81 Test::Nebulous->setup; 82 83 { 84 my $neb = Nebulous::Client->new( 85 proxy => "http://$hostport/nebulous", 86 ); 87 $neb->create( "foo" ); 88 89 is( $neb->delete("foo", undef), 1, "force flag false" ); 90 } 91 92 Test::Nebulous->setup; 93 94 { 95 my $neb = Nebulous::Client->new( 96 proxy => "http://$hostport/nebulous", 97 ); 98 $neb->create( "foo" ); 99 100 is( $neb->delete("foo", 1), 1, "force flag false" ); 101 } 102 78 103 Test::Nebulous->setup; 79 104 … … 84 109 $neb->delete(); 85 110 }; 86 like( $@, qr/1 wasexpected/, "no params" );111 like( $@, qr/1 - 2 were expected/, "no params" ); 87 112 88 113 Test::Nebulous->setup; … … 92 117 proxy => "http://$hostport/nebulous", 93 118 ); 94 $neb->delete( "foo", 2);119 $neb->delete( "foo", 3); 95 120 }; 96 like( $@, qr/1 was expected/, "too many params" ); 121 like( $@, qr/is boolean/, "force flag not boolean" ); 122 123 Test::Nebulous->setup; 124 125 eval { 126 my $neb = Nebulous::Client->new( 127 proxy => "http://$hostport/nebulous", 128 ); 129 $neb->delete( "foo", 0, 2 ); 130 }; 131 like( $@, qr/1 - 2 were expected/, "too many params" ); 97 132 98 133 Test::Nebulous->cleanup;
Note:
See TracChangeset
for help on using the changeset viewer.
