[freeside-commits] freeside/rt/lib/t 02regression.t, 1.1.1.2, 1.2 03web.pl, 1.1.1.2, 1.2 04_send_email.pl, 1.1.1.2, 1.2

Ivan,,, ivan at wavetail.420.am
Wed Aug 1 15:20:35 PDT 2007


Update of /home/cvs/cvsroot/freeside/rt/lib/t
In directory wavetail:/tmp/cvs-serv22987/lib/t

Modified Files:
	02regression.t 03web.pl 04_send_email.pl 
Log Message:
commit these RT differences, seem to be mostly in autogen'ed stuff

Index: 02regression.t
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/t/02regression.t,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -d -r1.1.1.2 -r1.2
--- 02regression.t	11 Mar 2004 02:05:01 -0000	1.1.1.2
+++ 02regression.t	1 Aug 2007 22:20:33 -0000	1.2
@@ -34,11 +34,14 @@
 
 
 use File::Find;
-File::Find::find({wanted => \&wanted_autogen}, 'lib/t/autogen');
+File::Find::find({wanted => \&wanted_autogen,	
+	preprocess => sub {return sort @_}}, 'lib/t/autogen');
 sub wanted_autogen { /^autogen.*\.t\z/s && require $_; }
 
-File::Find::find({wanted => \&wanted_regression}, 'lib/t/regression');
+File::Find::find({wanted => \&wanted_regression,
+	preprocess => sub {return sort @_}}, 'lib/t/regression');
 sub wanted_regression { /^*\.t\z/s && require $_; }
 
 require "/opt/rt3/lib/t/03web.pl";
 require "/opt/rt3/lib/t/04_send_email.pl";
+require "/opt/rt3/lib/t/05cronsupport.pl";

Index: 04_send_email.pl
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/t/04_send_email.pl,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -d -r1.1.1.2 -r1.2
--- 04_send_email.pl	11 Mar 2004 02:05:03 -0000	1.1.1.2
+++ 04_send_email.pl	1 Aug 2007 22:20:33 -0000	1.2
@@ -476,6 +476,31 @@
 
 # }}}
 
+# {{{ test a multi-line RT-Send-CC header
+
+my $content =  `cat /opt/rt3/lib/t/data/rt-send-cc` || die "couldn't find new content";
+
+$parser->ParseMIMEEntityFromScalar($content);
+
+
+
+my %args =        (message => $content, queue => 1, action => 'correspond');
+ RT::Interface::Email::Gateway(\%args);
+my $tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
+my $tick = $tickets->First();
+ok ($tick->Id, "found ticket ".$tick->Id);
+
+my $cc = $tick->Transactions->First->Attachments->First->GetHeader('RT-Send-Cc');
+ok ($cc =~ /test1/, "Found test 1");
+ok ($cc =~ /test2/, "Found test 2");
+ok ($cc =~ /test3/, "Found test 3");
+ok ($cc =~ /test4/, "Found test 4");
+ok ($cc =~ /test5/, "Found test 5");
+
+# }}}
+
 # Don't taint the environment
 $everyone->PrincipalObj->RevokeRight(Right =>'SuperUser');
 1;

Index: 03web.pl
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/t/03web.pl,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -d -r1.1.1.2 -r1.2
--- 03web.pl	11 Mar 2004 02:05:01 -0000	1.1.1.2
+++ 03web.pl	1 Aug 2007 22:20:33 -0000	1.2
@@ -67,7 +67,83 @@
 
 # }}}
 
+# {{{ Query Builder tests
+
+my $response = $agent->get($url."Search/Build.html");
+ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
+
+# Parsing TicketSQL
+#
+# Adding items
+
+# set the first value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "aaa");
+$agent->submit();
+
+# set the next value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "bbb");
+$agent->submit();
+
+ok($agent->form_name('BuildQuery'));
+
+# get the query
+my $query = $agent->current_form->find_input("Query")->value;
+# strip whitespace from ends
+$query =~ s/^\s*//g;
+$query =~ s/\s*$//g;
+
+# collapse other whitespace
+$query =~ s/\s+/ /g;
+
+is ($query, "Subject LIKE 'aaa' AND Subject LIKE 'bbb'");
+
+# - new items go one level down
+# - add items at currently selected level
+# - if nothing is selected, add at end, one level down
+#
+# move left
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move left if you're at the top level
+#
+# move right
+# - error if nothing selected
+# - same item should be selected after move
+# - can always move right (no max depth...should there be?)
+#
+# move up
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move up if you're first in the list
+#
+# move down
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move down if you're last in the list
+#
+# toggle
+# - error if nothing selected
+# - change all aggregators in the grouping
+# - don't change any others
+#
+# delete
+# - error if nothing selected
+# - delete currently selected item
+# - delete all children of a grouping
+# - if delete leaves a node with no children, delete that, too
+# - what should be selected?
+#
+# Clear
+# - clears entire query
+# - clears it from the session, too
 
+# }}}
 
 use File::Find;
 find ( \&wanted , 'html/');
@@ -83,7 +159,7 @@
         $file =~ s#^html/##; 
         ok ($agent->get("$url/$file", "GET $url/$file"));
         is ($agent->{'status'}, 200, "Loaded $file");
-        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
+#        ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
         ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for  $file");
         ok( $agent->{'content'} !~ /System error/i, "Didn't get a Mason compilation error on $file");
         



More information about the freeside-commits mailing list