-#!/usr/bin/perl -w
use strict;
use warnings;
{
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';
}
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'};
}
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'};
}
{
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';
}
$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';
$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';