diff options
author | Russ Allbery <rra@stanford.edu> | 2011-05-17 16:11:06 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2011-05-17 16:11:06 -0700 |
commit | 4ee50d93cf99f55a503d0ca788e6c1a468eeacf6 (patch) | |
tree | d03149c8148c682337f791b45b76226ed613f04f /perl/t/admin.t | |
parent | deaa5c140e85d8e1248d910f0721c9e00a46e439 (diff) |
Add wallet-admin upgrade command to upgrade the database
Hook the new upgrade method of Wallet::Schema into Wallet::Admin
and the wallet-admin wrapper script.
Diffstat (limited to 'perl/t/admin.t')
-rwxr-xr-x | perl/t/admin.t | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perl/t/admin.t b/perl/t/admin.t index 074dbc6..6250f8e 100755 --- a/perl/t/admin.t +++ b/perl/t/admin.t @@ -3,11 +3,12 @@ # Tests for wallet administrative interface. # # Written by Russ Allbery <rra@stanford.edu> -# Copyright 2008, 2009, 2010 Board of Trustees, Leland Stanford Jr. University +# Copyright 2008, 2009, 2010, 2011 +# The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. -use Test::More tests => 16; +use Test::More tests => 18; use Wallet::Admin; use Wallet::Report; @@ -24,6 +25,8 @@ is ($@, '', 'Wallet::Admin creation did not die'); ok ($admin->isa ('Wallet::Admin'), ' and returned the right class'); is ($admin->initialize ('admin@EXAMPLE.COM'), 1, ' and initialization succeeds'); +is ($admin->upgrade, 1, ' and upgrade succeeds (should do nothing)'); +is ($admin->error, undef, ' and there is no error'); # We have an empty database, so we should see no objects and one ACL. my $report = Wallet::Report->new; |