[Rt-commit] rt branch, 4.0/skip-reminders-on-ticket-clone, updated. rt-4.0.3-44-gfe56d65
Jason May
jasonmay at bestpractical.com
Mon Dec 5 13:59:27 EST 2011
The branch, 4.0/skip-reminders-on-ticket-clone has been updated
via fe56d65c032eb52da9f32eb7e994a3ba01241ef7 (commit)
from 17eaceec7fe17ea126d006d1f50b4b0447788adc (commit)
Summary of changes:
t/web/ticket_links.t | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit fe56d65c032eb52da9f32eb7e994a3ba01241ef7
Author: Jason May <jasonmay at bestpractical.com>
Date: Mon Dec 5 14:02:33 2011 -0500
Test to ensure article links get preserved on a ticket clone
diff --git a/t/web/ticket_links.t b/t/web/ticket_links.t
index 8a5ec32..81f5f37 100644
--- a/t/web/ticket_links.t
+++ b/t/web/ticket_links.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use RT::Test tests => 144;
+use RT::Test tests => 146;
my ( $baseurl, $m ) = RT::Test->started_ok;
ok( $m->login, "Logged in" );
@@ -24,6 +24,16 @@ is( $deleted->Status, 'deleted', "deleted $deleted_id" );
$inactive->SetStatus('resolved');
is( $inactive->Status, 'resolved', 'resolved $inactive_id' );
+# reate an article for linking
+require RT::Class;
+my $class = RT::Class->new($RT::SystemUser);
+$class->Create(Name => 'test class');
+
+require RT::Article;
+my $article = RT::Article->new($RT::SystemUser);
+
+$article->Create(Class => $class->Id, Name => 'test article');
+
for my $type ( "DependsOn", "MemberOf", "RefersTo" ) {
for my $c (qw/base target/) {
my $id;
@@ -133,8 +143,15 @@ for my $type ( "DependsOn", "MemberOf", "RefersTo" ) {
if ($type eq 'RefersTo') {
$m->goto_ticket($ticket->Id);
$m->follow_link(id => 'page-links');
+
+ # add $baseurl as a link
$m->form_name('ModifyLinks');
- $m->field($link_field => $baseurl);
+ $m->field($link_field => "$baseurl/test_ticket_reference");
+ $m->click('SubmitTicket');
+
+ # add an article as a link
+ $m->form_name('ModifyLinks');
+ $m->field($link_field => 'a:' . $article->Id);
$m->click('SubmitTicket');
}
@@ -146,7 +163,10 @@ for my $type ( "DependsOn", "MemberOf", "RefersTo" ) {
$m->form_name('TicketCreate');
$m->click_button(value => 'Create');
$m->content_lacks('hello test reminder subject');
- $m->text_contains("(Create) $baseurl") if $type eq 'RefersTo';
+ if ($type eq 'RefersTo') {
+ $m->text_contains("$baseurl/test_ticket_reference");
+ $m->text_contains("Article " . $article->Id . ': test article');
+ }
}
}
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list