summaryrefslogtreecommitdiff
path: root/rt/t/web/gnupg-select-keys-on-update.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-09 22:27:04 -0700
commite131b1f71f08b69abb832c1687d1f29682d171f8 (patch)
tree490167e41d9fe05b760e7b21a96ee35a86f8edda /rt/t/web/gnupg-select-keys-on-update.t
parentd05d7346bb2387fd9d0354923d577275c5c7f019 (diff)
RT 4.2.11, ticket#13852
Diffstat (limited to 'rt/t/web/gnupg-select-keys-on-update.t')
-rw-r--r--rt/t/web/gnupg-select-keys-on-update.t19
1 files changed, 8 insertions, 11 deletions
diff --git a/rt/t/web/gnupg-select-keys-on-update.t b/rt/t/web/gnupg-select-keys-on-update.t
index a5b01d3..a666851 100644
--- a/rt/t/web/gnupg-select-keys-on-update.t
+++ b/rt/t/web/gnupg-select-keys-on-update.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test::GnuPG tests => 88, gnupg_options => { passphrase => 'rt-test' };
+use RT::Test::GnuPG tests => 86, gnupg_options => { passphrase => 'rt-test' };
use RT::Action::SendEmail;
@@ -52,7 +52,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';
}
@@ -82,10 +82,7 @@ diag "check that things don't work if there is no key";
my @mail = RT::Test->fetch_caught_mails;
ok !@mail, 'there are no outgoing emails';
- for (1 .. 2) {
- $m->next_warning_like(qr/public key not found/);
- $m->next_warning_like(qr/above error may result from an unconfigured RT\/GPG/);
- }
+ $m->next_warning_like(qr/public key not found/) for 1 .. 2;
$m->no_leftover_warnings_ok;
}
@@ -94,7 +91,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'};
}
@@ -144,7 +141,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'};
}
@@ -192,7 +189,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';
}
@@ -253,7 +250,7 @@ diag "check that key selector works and we can select trusted key";
$m->select( 'UseKey-rt-test@example.com' => $fpr1 );
$m->click('SubmitTicket');
- $m->content_contains('Message recorded', 'Message recorded' );
+ $m->content_contains('Correspondence added', 'Correspondence added' );
my @mail = RT::Test->fetch_caught_mails;
ok @mail, 'there are some emails';
@@ -289,7 +286,7 @@ diag "check encrypting of attachments";
$m->select( 'UseKey-rt-test@example.com' => $fpr1 );
$m->click('SubmitTicket');
- $m->content_contains('Message recorded', 'Message recorded' );
+ $m->content_contains('Correspondence added', 'Correspondence added' );
my @mail = RT::Test->fetch_caught_mails;
ok @mail, 'there are some emails';