[otrs-cvs] otrs/scripts/test PostMaster.t,1.7,1.8
CVS commits notifications of OTRS.org
cvs-log at otrs.org
Tue Apr 29 22:02:02 GMT 2008
Comments:
Update of /home/cvs/otrs/scripts/test
In directory lancelot:/tmp/cvs-serv3549/scripts/test
Modified Files:
PostMaster.t
Log Message:
Added unit tests for X-OTRS-TicketKey, X-OTRS-TicketValue and X-OTRS-TicketTime headers.
Author: martin
Index: PostMaster.t
===================================================================
RCS file: /home/cvs/otrs/scripts/test/PostMaster.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** PostMaster.t 22 Feb 2008 21:32:30 -0000 1.7
--- PostMaster.t 29 Apr 2008 22:01:57 -0000 1.8
***************
*** 68,72 ****
my $UserRand1 = 'example-user'.int(rand(1000000)).'@example.com';
! for my $File (qw(1 2 3 6 11)) {
# new ticket check
--- 68,72 ----
my $UserRand1 = 'example-user'.int(rand(1000000)).'@example.com';
! for my $File (qw(1 2 3 5 6 11)) {
# new ticket check
***************
*** 141,144 ****
--- 141,201 ----
}
+
+ if ($File == 5) {
+ # check body
+ my %Article = $Self->{TicketObject}->ArticleGet(
+ ArticleID => $ArticleIDs[0],
+ );
+ my @Tests = (
+ {
+ Key => 'TicketFreeKey1',
+ Result => 'Test',
+ },
+ {
+ Key => 'TicketFreeText1',
+ Result => 'ABC',
+ },
+ {
+ Key => 'TicketFreeKey2',
+ Result => 'Test2',
+ },
+ {
+ Key => 'TicketFreeText2',
+ Result => 'ABC2',
+ },
+ {
+ Key => 'TicketFreeTime1',
+ Result => '2008-01-12 13:14:00',
+ },
+ {
+ Key => 'TicketFreeTime2',
+ Result => '2008-01-12 13:15:00',
+ },
+ {
+ Key => 'TicketFreeTime3',
+ Result => '2008-01-12 13:16:00',
+ },
+ {
+ Key => 'TicketFreeTime4',
+ Result => '2008-01-12 13:17:00',
+ },
+ {
+ Key => 'TicketFreeTime5',
+ Result => '2008-01-12 13:18:00',
+ },
+ {
+ Key => 'TicketFreeTime6',
+ Result => '2008-01-12 13:19:00',
+ },
+ );
+ for my $Test ( @Tests ) {
+ $Self->Is(
+ $Article{ $Test->{Key} } || '',
+ $Test->{Result} || '-',
+ "#$NumberModule $StorageModule $File $Test->{Key} check",
+ );
+ }
+ }
+
if ($File == 6) {
More information about the cvs-log
mailing list