[Rt-commit] r3093 - in RT-Action-ExtractSubjectTag: . t
kevinr at bestpractical.com
kevinr at bestpractical.com
Wed Jun 8 18:43:32 EDT 2005
Author: kevinr
Date: Wed Jun 8 18:43:32 2005
New Revision: 3093
Modified:
RT-Action-ExtractSubjectTag/ (props changed)
RT-Action-ExtractSubjectTag/t/01extract_tags.t
Log:
r4081 at sad-girl-in-snow: kevinr | 2005-06-08 18:43:20 -0400
* The tests now actually work.
Modified: RT-Action-ExtractSubjectTag/t/01extract_tags.t
==============================================================================
--- RT-Action-ExtractSubjectTag/t/01extract_tags.t (original)
+++ RT-Action-ExtractSubjectTag/t/01extract_tags.t Wed Jun 8 18:43:32 2005
@@ -124,10 +124,10 @@
ok ($user->id, "Found our user");
my $ticket_mult = RT::Ticket->new($user);
($id, $transaction_obj, $message)
- = $ticket->Create( Requestor => ['root at example.com'],
- Queue => 'general',
- Subject => 'Multiple ExtractSubjectTag test',
- );
+ = $ticket_mult->Create( Requestor => ['root at example.com'],
+ Queue => 'general',
+ Subject => 'Multiple ExtractSubjectTag test',
+ );
ok ($id, "create new ticket? $message");
# parse a new e-mail with multiple tags
@@ -147,16 +147,17 @@
($id, $message) = $parser->SmartParseMIMEEntityFromScalar(
Message => $email_mult, Decode => 1 );
ok($parser->Entity, "Parser returned a MIME entity");
-ok($parser->Entity->head, "Entity had a header:\n@{[$parser->Head->stringify]}");
+#ok($parser->Entity->head, "Entity had a header:\n@{[$parser->Head->stringify]}");
+ok($parser->Entity->head, "Entity had a header");
# check to make sure the scrip will add both tags to the ticket
($id, $message, $transaction_obj) = $ticket_mult->Correspond(MIMEObj=>$parser->Entity);
ok($id, "conduct transaction? $message");
-#ok(
-# ($ticket_mult->Subject() =~ /\Q[foo.example #24]\E/) &&
-# ($ticket_mult->Subject() =~ /\Q[bar.example #36]\E/),
-# "Both tags were added to the ticket's subject"
-#);
+ok(
+ ($ticket_mult->Subject() =~ /\Q[example.net #12]\E/) &&
+ ($ticket_mult->Subject() =~ /\Q[example.org #42]\E/),
+ "Both tags were added to the ticket's subject"
+);
1;
More information about the Rt-commit
mailing list