[Rt-commit] r18086 - in rt/3.999/branches/merge_to_3.8.2: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 23:24:01 EST 2009


Author: sunnavy
Date: Thu Jan 29 23:23:58 2009
New Revision: 18086

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/t/clicky.t

Log:
 r19345 at sunnavys-mb:  sunnavy | 2009-01-30 10:22:26 +0800
 merged t/clicky.t


Modified: rt/3.999/branches/merge_to_3.8.2/t/clicky.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/clicky.t	(original)
+++ rt/3.999/branches/merge_to_3.8.2/t/clicky.t	Thu Jan 29 23:23:58 2009
@@ -8,7 +8,7 @@
 
 my %clicky = map { $_ => 1 } grep $_, RT->config->get('ActiveMakeClicky');
 if ( keys %clicky ) {
-    plan tests => 8;
+    plan tests => 14;
 } else {
     plan skip_all => 'No active Make Clicky actions';
 }
@@ -67,3 +67,47 @@
     ok( scalar @links, 'found clicky link' );
 }
 
+{
+
+my $message = MIME::Entity->build(
+    type    => 'text/html',
+    Subject => 'test',
+    Data    => <<END,
+If you have some problems with RT you could find help
+on <a href="http://wiki.bestpractical.com">wiki</a> 
+or find known bugs on http://rt3.fsck.com
+--
+Best regards. BestPractical Team.
+END
+);
+
+my $ticket = RT::Model::Ticket->new(current_user => $current_user);
+my ($id) = $ticket->create(
+    subject => 'test',
+    queue   => $queue->id,
+    mime_obj => $message,
+);
+ok( $id,                                   "We created a ticket #$id" );
+ok( $ticket->transactions->first->Content, "Has some content" );
+
+ok $m->login, 'logged in';
+ok $m->goto_ticket($id), 'opened diplay page of the ticket';
+
+SKIP: {
+    skip "httpurl action disabled", 2 unless $clicky{'httpurl'};
+    my @links = $m->find_link(
+        tag  => 'a',
+        url  => 'http://wiki.bestpractical.com',
+        text => 'Open URL',
+    );
+    ok( @links == 0, 'not make clicky links clicky twice' );
+
+    @links = $m->find_link(
+        tag  => 'a',
+        url  => 'http://rt3.fsck.com',
+        text => 'Open URL',
+    );
+    ok( scalar @links, 'found clicky link' );
+}
+
+}


More information about the Rt-commit mailing list