[Rt-commit] r14559 - in rt/branches/3.999-DANGEROUS: . t/api t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Jul 28 00:32:42 EDT 2008
Author: sunnavy
Date: Mon Jul 28 00:32:42 2008
New Revision: 14559
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/t/api/date.t
rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t
Log:
r15038 at sunnavys-mb: sunnavy | 2008-07-28 11:59:55 +0800
updated tests
Modified: rt/branches/3.999-DANGEROUS/t/api/date.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/date.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/date.t Mon Jul 28 00:32:42 2008
@@ -18,7 +18,7 @@
# set timezone in all places to UTC
RT->system_user->user_object->__set(column => 'timezone', value => 'UTC')
if RT->system_user->user_object->timezone;
- RT->config->set( timezone => 'UTC' );
+ RT->config->set( Timezone => 'UTC' );
}
my $current_user;
@@ -50,7 +50,7 @@
is($date->timezone, 'UTC', "the deafult value is always UTC");
is($date->timezone('server'), 'UTC', "wasn't changed");
- RT->config->set( timezone => 'Africa/Ouagadougou' );
+ RT->config->set( Timezone => 'Africa/Ouagadougou' );
is($date->timezone('server'),
'Africa/Ouagadougou',
"timezone of the RT server was changed");
@@ -68,12 +68,12 @@
"in user context returns timezone of the server if user's one is not defined");
is($date->timezone, 'UTC', "the deafult value is always UTC");
- RT->config->set( timezone => 'GMT' );
+ RT->config->set( Timezone => 'GMT' );
is($date->timezone('server'),
'UTC',
"timezone is GMT which one is alias for UTC");
- RT->config->set( timezone => '' );
+ RT->config->set( Timezone => '' );
is($date->timezone, 'UTC', "dropped all timzones to UTC");
is($date->timezone('user'),
'UTC',
@@ -82,7 +82,7 @@
'UTC',
"timezone of the server is not defined so UTC");
- RT->config->set( timezone => 'UTC' );
+ RT->config->set( Timezone => 'UTC' );
}
{
@@ -287,11 +287,11 @@
$date->set(format => 'unknown', value => 'weird date');
is($date->unix, 0, "date was wrong");
- RT->config->set( timezone => 'Europe/Moscow' );
+ RT->config->set( Timezone => 'Europe/Moscow' );
$date->set(format => 'datemanip', value => '2005-11-28 15:10:00');
is($date->iso, '2005-11-28 12:10:00', "YYYY-DD-MM hh:mm:ss");
- RT->config->set( timezone => 'UTC' );
+ RT->config->set( Timezone => 'UTC' );
$date->set(format => 'datemanip', value => '2005-11-28 15:10:00');
is($date->iso, '2005-11-28 15:10:00', "YYYY-DD-MM hh:mm:ss");
@@ -306,14 +306,14 @@
$date->set(format => 'unknown', value => 'weird date');
is($date->unix, 0, "date was wrong");
- RT->config->set( timezone => 'Europe/Moscow' );
+ RT->config->set( Timezone => 'Europe/Moscow' );
$date->set(format => 'unknown', value => '2005-11-28 15:10:00');
is($date->iso, '2005-11-28 12:10:00', "YYYY-DD-MM hh:mm:ss");
$date->set(format => 'unknown', value => '2005-11-28 15:10:00', timezone => 'utc' );
is($date->iso, '2005-11-28 15:10:00', "YYYY-DD-MM hh:mm:ss");
- RT->config->set( timezone => 'UTC' );
+ RT->config->set( Timezone => 'UTC' );
$date->set(format => 'unknown', value => '2005-11-28 15:10:00');
is($date->iso, '2005-11-28 15:10:00', "YYYY-DD-MM hh:mm:ss");
@@ -330,7 +330,7 @@
{ # SetToMidnight
my $date = RT::Date->new(current_user => RT->system_user);
- RT->config->set( timezone => 'Europe/Moscow' );
+ RT->config->set( Timezone => 'Europe/Moscow' );
$date->set(format => 'ISO', value => '2005-11-28 15:10:00');
$date->set_to_midnight;
is($date->iso, '2005-11-28 00:00:00', "default is utc");
@@ -358,7 +358,7 @@
$date->set_to_midnight(timezone => 'server');
is($date->iso, '2005-11-27 21:00:00', "server context");
- RT->config->set( timezone => 'UTC' );
+ RT->config->set( Timezone => 'UTC' );
}
{ # set_to_now
@@ -414,18 +414,18 @@
my $date = RT::Date->new(current_user => $current_user );
is($date->as_string, "Not set", "AsString returns 'Not set'");
- RT->config->set( date_time_format => '');
+ RT->config->set( DateTimeFormat => '');
$date->unix(1);
is($date->as_string, 'Thu Jan 01 00:00:01 1970', "correct string");
is($date->as_string(date => 0), '00:00:01', "correct string");
is($date->as_string(time => 0), 'Thu Jan 01 1970', "correct string");
is($date->as_string(date => 0, time => 0), 'Thu Jan 01 00:00:01 1970', "invalid input");
- RT->config->set( date_time_format => 'RFC2822' );
+ RT->config->set( DateTimeFormat => 'RFC2822' );
$date->unix(1);
is($date->as_string, 'Thu, 1 Jan 1970 00:00:01 +0000', "correct string");
- RT->config->set( date_time_format => { format => 'RFC2822', seconds => 0 } );
+ RT->config->set( DateTimeFormat => { format => 'RFC2822', seconds => 0 } );
$date->unix(1);
is($date->as_string, 'Thu, 1 Jan 1970 00:00 +0000', "correct string");
is($date->as_string(seconds => 1), 'Thu, 1 Jan 1970 00:00:01 +0000', "correct string");
Modified: rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t (original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/scrips_batch.t Mon Jul 28 00:32:42 2008
@@ -12,7 +12,7 @@
my $queue = RT::Test->load_or_create_queue( name => 'Regression' );
ok $queue && $queue->id, 'loaded or created queue';
-RT->config->set( use_transaction_batch => 1 );
+RT->config->set( UseTransactionBatch => 1 );
my ($baseurl, $m) = RT::Test->started_ok;
ok $m->login, 'logged in as root';
Modified: rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t (original)
+++ rt/branches/3.999-DANGEROUS/t/web/crypt-gnupg.t Mon Jul 28 00:32:42 2008
@@ -19,8 +19,8 @@
RT->config->set( LogToScreen => 'debug' );
RT->config->set( LogStackTraces => 'error' );
-RT->config->set( comment_address => 'general at example.com');
-RT->config->set( correspond_address => 'general at example.com');
+RT->config->set( CommentAddress => 'general at example.com');
+RT->config->set( CorrespondAddress => 'general at example.com');
RT->config->set( DefaultSearchResultFormat => qq{
'<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#',
'<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__subject__</a></B>/TITLE:subject',
More information about the Rt-commit
mailing list