[Rt-commit] r17202 - rt/3.8/trunk/t
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Dec 12 19:08:29 EST 2008
Author: sunnavy
Date: Fri Dec 12 19:08:28 2008
New Revision: 17202
Modified:
rt/3.8/trunk/t/clicky.t
Log:
tests for html clicky
Modified: rt/3.8/trunk/t/clicky.t
==============================================================================
--- rt/3.8/trunk/t/clicky.t (original)
+++ rt/3.8/trunk/t/clicky.t Fri Dec 12 19:08:28 2008
@@ -8,7 +8,7 @@
my %clicky = map { $_ => 1 } grep $_, RT->Config->Get('Active_MakeClicky');
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 = new RT::Ticket($CurrentUser);
+my ($id) = $ticket->Create(
+ Subject => 'test',
+ Queue => $queue->Id,
+ MIMEObj => $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