X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fweb%2Fgnupg-select-keys-on-create.t;h=e30b264d9da8671bede248e9db1ef84e6a506904;hb=dadbfd8b7e4e471151ed828f5173ceb7dee95fe5;hp=cf27e48a724cc25a63b6e7bfbf50b942c6ad3097;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/t/web/gnupg-select-keys-on-create.t b/rt/t/web/gnupg-select-keys-on-create.t index cf27e48a7..e30b264d9 100644 --- a/rt/t/web/gnupg-select-keys-on-create.t +++ b/rt/t/web/gnupg-select-keys-on-create.t @@ -1,4 +1,3 @@ -#!/usr/bin/perl -w use strict; use warnings; @@ -38,7 +37,7 @@ diag "check that signing doesn't work if there is no key"; { RT::Test->import_gnupg_key('rt-recipient@example.com'); RT::Test->trust_gnupg_key('rt-recipient@example.com'); - my %res = RT::Crypt::GnuPG::GetKeysInfo('rt-recipient@example.com'); + my %res = RT::Crypt->GetKeysInfo( Key => 'rt-recipient@example.com' ); is $res{'info'}[0]{'TrustTerse'}, 'ultimate', 'ultimately trusted key'; } @@ -75,7 +74,7 @@ diag "import first key of rt-test\@example.com"; my $fpr1 = ''; { RT::Test->import_gnupg_key('rt-test@example.com', 'public'); - my %res = RT::Crypt::GnuPG::GetKeysInfo('rt-test@example.com'); + my %res = RT::Crypt->GetKeysInfo( Key => 'rt-test@example.com' ); is $res{'info'}[0]{'TrustLevel'}, 0, 'is not trusted key'; $fpr1 = $res{'info'}[0]{'Fingerprint'}; } @@ -124,7 +123,7 @@ diag "import a second key of rt-test\@example.com"; my $fpr2 = ''; { RT::Test->import_gnupg_key('rt-test@example.com.2', 'public'); - my %res = RT::Crypt::GnuPG::GetKeysInfo('rt-test@example.com'); + my %res = RT::Crypt->GetKeysInfo( Key => 'rt-test@example.com' ); is $res{'info'}[1]{'TrustLevel'}, 0, 'is not trusted key'; $fpr2 = $res{'info'}[2]{'Fingerprint'}; } @@ -171,7 +170,7 @@ diag "check that things still doesn't work if two keys are not trusted"; { RT::Test->lsign_gnupg_key( $fpr1 ); - my %res = RT::Crypt::GnuPG::GetKeysInfo('rt-test@example.com'); + my %res = RT::Crypt->GetKeysInfo( Key => 'rt-test@example.com' ); ok $res{'info'}[0]{'TrustLevel'} > 0, 'trusted key'; is $res{'info'}[1]{'TrustLevel'}, 0, 'is not trusted key'; }