summaryrefslogtreecommitdiff
path: root/perl/t/init.t
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2013-03-27 15:19:54 -0700
committerRuss Allbery <rra@stanford.edu>2013-03-27 15:19:54 -0700
commit5df16adc5024c56e3d733741919954308b4d498a (patch)
tree5f042adaaa988478ca271f41f9b272ef5a1b45b5 /perl/t/init.t
parent431c3b56a52b9fe3135ab4339bada13ed49bda92 (diff)
parent6871bae8e26beadaff5035de56b4f70a78961dc9 (diff)
Merge tag 'upstream/1.0' into debian
Upstream version 1.0
Diffstat (limited to 'perl/t/init.t')
-rwxr-xr-xperl/t/init.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl/t/init.t b/perl/t/init.t
index 213aedf..142f54c 100755
--- a/perl/t/init.t
+++ b/perl/t/init.t
@@ -3,7 +3,8 @@
# Tests for database initialization.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2007, 2008 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2007, 2008
+# The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.
@@ -24,7 +25,7 @@ is ($admin->initialize ('admin@EXAMPLE.COM'), 1,
' and initialization succeeds');
# Check whether the database entries that should be created were.
-my $acl = eval { Wallet::ACL->new ('ADMIN', $admin->dbh) };
+my $acl = eval { Wallet::ACL->new ('ADMIN', $admin->schema) };
is ($@, '', 'Retrieving ADMIN ACL successful');
ok ($acl->isa ('Wallet::ACL'), ' and is the right class');
my @entries = $acl->list;
@@ -38,7 +39,7 @@ is ($admin->reinitialize ('admin@EXAMPLE.ORG'), 1,
'Reinitialization succeeded');
# Now repeat the database content checks.
-$acl = eval { Wallet::ACL->new ('ADMIN', $admin->dbh) };
+$acl = eval { Wallet::ACL->new ('ADMIN', $admin->schema) };
is ($@, '', 'Retrieving ADMIN ACL successful');
ok ($acl->isa ('Wallet::ACL'), ' and is the right class');
@entries = $acl->list;
@@ -49,7 +50,7 @@ is ($entries[0][1], 'admin@EXAMPLE.ORG', ' with the right user');
# Test cleanup.
is ($admin->destroy, 1, 'Destroying the database works');
-$acl = eval { Wallet::ACL->new ('ADMIN', $admin->dbh) };
+$acl = eval { Wallet::ACL->new ('ADMIN', $admin->schema) };
like ($@, qr/^cannot search for ACL ADMIN: /,
' and now the database is gone');
unlink 'wallet-db';