r592@rob-kinyons-computer-2 (orig r10555): rkinyon | 2008-01-15 14:19:42 -0500
[dbsrgits/DBM-Deep.git] / t / 07_locking.t
index 09e3c8d..004e03b 100644 (file)
@@ -2,17 +2,23 @@
 # DBM::Deep Test
 ##
 use strict;
-use Test::More tests => 4;
+use Test::More tests => 5;
+use Test::Exception;
 use t::common qw( new_fh );
 
 use_ok( 'DBM::Deep' );
 
 my ($fh, $filename) = new_fh();
 my $db = DBM::Deep->new(
-       file => $filename,
-       locking => 1,
+    file => $filename,
+    fh => $fh,
+    locking => 1,
 );
 
+lives_ok {
+    $db->unlock;
+} "Can call unlock on an unlocked DB.";
+
 ##
 # basic put/get
 ##