[Rt-commit] rt branch, admin_ui, updated. a93f022d32d69debc13c32dcfac5a42bebfc7ea5
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Dec 28 00:42:37 EST 2009
The branch, admin_ui has been updated
via a93f022d32d69debc13c32dcfac5a42bebfc7ea5 (commit)
from 0a1a50ebc6b2511acd414bc9a42ee6d57b6e3e74 (commit)
Summary of changes:
t/mail/gnupg-bad.t | 13 ++++---------
t/mail/gnupg-incoming.t | 13 ++++---------
t/mail/gnupg-realmail.t | 12 ++++++------
3 files changed, 14 insertions(+), 24 deletions(-)
- Log -----------------------------------------------------------------
commit a93f022d32d69debc13c32dcfac5a42bebfc7ea5
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 28 13:42:18 2009 +0800
we don't need test /admin/ views in t/mail
diff --git a/t/mail/gnupg-bad.t b/t/mail/gnupg-bad.t
index 4777341..be23abc 100644
--- a/t/mail/gnupg-bad.t
+++ b/t/mail/gnupg-bad.t
@@ -9,7 +9,7 @@ plan skip_all => 'GnuPG required.'
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 6;
+plan tests => 2;
use Cwd 'getcwd';
@@ -36,15 +36,10 @@ RT->config->set(
RT->config->set( 'mail_plugins' => ['Auth::MailFrom', 'Auth::GnuPG'] );
-my ($baseurl, $m) = RT::Test->started_ok;
+my $queue = RT::Model::Queue->new( current_user => RT->system_user );
+$queue->load('General');
+$queue->set_correspond_address( 'rt at example.com' );
-$m->login;
-$m->content_like(qr/Logout/, 'we did log in');
-$m->get( $baseurl.'/Admin/Queues/');
-$m->follow_link_ok( text => 'General', url_regex => qr!/Admin/Queues! );
-$m->submit_form( form_name => 'queue_modify',
- fields => { correspond_address => 'rt at example.com' } );
-$m->content_like(qr/rt\@example.com.* - never/, 'has key info.');
ok(my $user = RT::Model::User->new(current_user => RT->system_user));
ok($user->load('root'), "loaded user 'root'");
$user->set_email('rt at example.com');
diff --git a/t/mail/gnupg-incoming.t b/t/mail/gnupg-incoming.t
index 035e63b..8fc0f47 100644
--- a/t/mail/gnupg-incoming.t
+++ b/t/mail/gnupg-incoming.t
@@ -10,7 +10,7 @@ plan skip_all => 'GnuPG required.'
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 46;
+plan tests => 43;
use Cwd 'getcwd';
use String::ShellQuote 'shell_quote';
@@ -43,14 +43,9 @@ RT->config->set( 'mail_plugins' => ['Auth::MailFrom', 'Auth::GnuPG'] );
my ($baseurl, $m) = RT::Test->started_ok;
-# configure key for General queue
-$m->login();
-$m->content_like(qr/Logout/, 'we did log in');
-$m->get( $baseurl.'/Admin/Queues/');
-$m->follow_link_ok( text => 'General', url_regex => qr!/Admin/Queues! );
-$m->submit_form( form_name => 'queue_modify',
- fields => { correspond_address => 'general at example.com' } );
-$m->content_like(qr/general\@example.com.* - never/, 'has key info.');
+my $queue = RT::Model::Queue->new( current_user => RT->system_user );
+$queue->load('General');
+$queue->set_correspond_address( 'rt at example.com' );
ok(my $user = RT::Model::User->new(current_user => RT->system_user));
ok($user->load('root'), "Loaded user 'root'");
diff --git a/t/mail/gnupg-realmail.t b/t/mail/gnupg-realmail.t
index a454f9c..559b6da 100644
--- a/t/mail/gnupg-realmail.t
+++ b/t/mail/gnupg-realmail.t
@@ -10,7 +10,7 @@ plan skip_all => 'GnuPG required.'
plan skip_all => 'gpg executable is required.'
unless RT::Test->find_executable('gpg');
-plan tests => 192;
+plan tests => 189;
use Digest::MD5 qw(md5_hex);
@@ -41,13 +41,13 @@ RT::Test->import_gnupg_key('rt-recipient at example.com');
RT::Test->import_gnupg_key('rt-test at example.com', 'public');
RT::Test->trust_gnupg_key('rt-test at example.com');
+my $queue = RT::Model::Queue->new( current_user => RT->system_user );
+$queue->load('General');
+$queue->set_correspond_address( 'rt-recipient at example.com' );
+
my ($baseurl, $m) = RT::Test->started_ok;
+
ok $m->login, 'we did log in';
-$m->get_ok( '/Admin/Queues/');
-$m->follow_link_ok( text => 'General', url_regex => qr!/Admin/Queues! );
-$m->submit_form( form_name => 'queue_modify',
- fields => { correspond_address => 'rt-recipient at example.com' } );
-$m->content_like(qr/rt-recipient\@example.com.* - never/, 'has key info.');
diag "load Everyone group" if $ENV{'TEST_VERBOSE'};
my $everyone;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list