aboutsummaryrefslogtreecommitdiff
path: root/perl/t/init.t
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2008-01-23 19:17:09 +0000
committerRuss Allbery <rra@stanford.edu>2008-01-23 19:17:09 +0000
commit45e33ff74717f39c421091f1a74f7d895e38bf57 (patch)
treeb2d6e6e2ce21612eae18ecde213e372787e58711 /perl/t/init.t
parent77b6875f95aa54fe9c648ba114e06d85cf655bb1 (diff)
Add a destroy() method to the Wallet::Admin object and use that instead
of Wallet::Schema::drop in the test suite.
Diffstat (limited to 'perl/t/init.t')
-rwxr-xr-xperl/t/init.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl/t/init.t b/perl/t/init.t
index 9e1b600..df2836b 100755
--- a/perl/t/init.t
+++ b/perl/t/init.t
@@ -8,7 +8,7 @@
#
# See LICENSE for licensing terms.
-use Test::More tests => 16;
+use Test::More tests => 18;
use Wallet::ACL;
use Wallet::Admin;
@@ -50,7 +50,9 @@ isnt ($entries[0], undef, ' which is a valid entry');
is ($entries[0][0], 'krb5', ' of krb5 scheme');
is ($entries[0][1], 'admin@EXAMPLE.ORG', ' with the right user');
-# Clean up.
-my $schema = Wallet::Schema->new;
-$schema->drop ($admin->dbh);
+# Test cleanup.
+is ($admin->destroy, 1, 'Destroying the database works');
+$acl = eval { Wallet::ACL->new ('ADMIN', $admin->dbh) };
+like ($@, qr/^cannot search for ACL ADMIN: /,
+ ' and now the database is gone');
unlink 'wallet-db';