[Rt-commit] rt branch, 4.2/different-result-msg-for-comment-reply, created. rt-4.2.6-27-g83aae23
Alex Vandiver
alexmv at bestpractical.com
Fri Jul 25 17:18:41 EDT 2014
The branch, 4.2/different-result-msg-for-comment-reply has been created
at 83aae23a447f861769648687574fe058d8c7845e (commit)
- Log -----------------------------------------------------------------
commit 83aae23a447f861769648687574fe058d8c7845e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu May 30 17:32:57 2013 +0400
return different message for comment and reply
Old "message recorded" is confusing as it doesn't differentiate
between correspond and comment.
diff --git a/lib/RT/Test/GnuPG.pm b/lib/RT/Test/GnuPG.pm
index f47a5d3..fed6900 100644
--- a/lib/RT/Test/GnuPG.pm
+++ b/lib/RT/Test/GnuPG.pm
@@ -166,7 +166,7 @@ sub update_ticket {
$m->click('SubmitTicket');
is $m->status, 200, "request successful";
- $m->content_contains("Message recorded", 'Message recorded') or diag $m->content;
+ $m->content_contains("Correspondence added", 'Correspondence added') or diag $m->content;
my @mail = RT::Test->fetch_caught_mails;
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 51413cc..293b398 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -1625,7 +1625,12 @@ sub _RecordNote {
return ( $Trans, $self->loc("Message could not be recorded"), undef );
}
- return ( $Trans, $self->loc("Message recorded"), $TransObj );
+ if ($args{NoteType} eq "Comment") {
+ $msg = $self->loc("Comments added");
+ } else {
+ $msg = $self->loc("Correspondence added");
+ }
+ return ( $Trans, $msg, $TransObj );
}
diff --git a/t/web/command_line.t b/t/web/command_line.t
index 1c17a79..c02c5e9 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -111,11 +111,11 @@ ok($val,$msg);
# add a comment to ticket
expect_send("comment -m 'comment-$$' $ticket_id", "Adding a comment...");
- expect_like(qr/Message recorded/, "Added the comment");
+ expect_like(qr/Comments added/, "Added the comment");
### should test to make sure it actually got added
# add correspondance to ticket (?)
expect_send("correspond -m 'correspond-$$' $ticket_id", "Adding correspondence...");
- expect_like(qr/Message recorded/, "Added the correspondence");
+ expect_like(qr/Correspondence added/, "Added the correspondence");
### should test to make sure it actually got added
my $test_email = RT::Test::get_relocatable_file('lorem-ipsum',
@@ -522,7 +522,7 @@ sub check_attachment {
my $attachment_path = shift;
(my $filename = $attachment_path) =~ s/.*\/(.*)$/$1/;
expect_send("comment -m 'attach file' -a $attachment_path $ticket_id", "Adding an attachment ($filename)");
- expect_like(qr/Message recorded/, "Added the attachment");
+ expect_like(qr/Comments added/, "Added the attachment");
expect_send("show ticket/$ticket_id/attachments","Finding Attachment");
my $attachment_regex = qr/(\d+):\s+$filename/;
expect_like($attachment_regex,"Attachment Uploaded");
diff --git a/t/web/command_line_ticket_content_type.t b/t/web/command_line_ticket_content_type.t
index afdd529..b37d0c4 100644
--- a/t/web/command_line_ticket_content_type.t
+++ b/t/web/command_line_ticket_content_type.t
@@ -38,7 +38,7 @@ for my $content_type ( 'text/plain', 'text/html' ) {
qq{comment ticket/$id -ct $content_type -m bar},
"commenting a ticket with content-type $content_type"
);
- expect_like( qr/Message recorded/, "commented the ticket" );
+ expect_like( qr/Comments added/, "commented the ticket" );
$m->goto_ticket($id);
$m->follow_link_ok( { text => 'with headers', n => 2 } );
diff --git a/t/web/gnupg-select-keys-on-update.t b/t/web/gnupg-select-keys-on-update.t
index e57e05f..a666851 100644
--- a/t/web/gnupg-select-keys-on-update.t
+++ b/t/web/gnupg-select-keys-on-update.t
@@ -250,7 +250,7 @@ diag "check that key selector works and we can select trusted key";
$m->select( 'UseKey-rt-test at example.com' => $fpr1 );
$m->click('SubmitTicket');
- $m->content_contains('Message recorded', 'Message recorded' );
+ $m->content_contains('Correspondence added', 'Correspondence added' );
my @mail = RT::Test->fetch_caught_mails;
ok @mail, 'there are some emails';
@@ -286,7 +286,7 @@ diag "check encrypting of attachments";
$m->select( 'UseKey-rt-test at example.com' => $fpr1 );
$m->click('SubmitTicket');
- $m->content_contains('Message recorded', 'Message recorded' );
+ $m->content_contains('Correspondence added', 'Correspondence added' );
my @mail = RT::Test->fetch_caught_mails;
ok @mail, 'there are some emails';
diff --git a/t/web/smime/outgoing.t b/t/web/smime/outgoing.t
index b37834d..21d2328 100644
--- a/t/web/smime/outgoing.t
+++ b/t/web/smime/outgoing.t
@@ -290,7 +290,7 @@ sub update_ticket {
$m->click('SubmitTicket');
is $m->status, 200, "request successful";
- $m->content_like(qr/Message recorded/, 'Message recorded');# or diag $m->content;
+ $m->content_like(qr/Correspondence added/, 'Correspondence added');# or diag $m->content;
$m->get_ok('/'); # ensure that the mail has been processed
diff --git a/t/web/ticket_modify_all.t b/t/web/ticket_modify_all.t
index 5891846..6b85d98 100644
--- a/t/web/ticket_modify_all.t
+++ b/t/web/ticket_modify_all.t
@@ -21,7 +21,7 @@ $m->submit_form(
button => 'SubmitTicket',
);
-$m->content_contains("Message recorded", 'updated ticket');
+$m->content_contains("Comments added", 'updated ticket');
$m->content_lacks("this is update content", 'textarea is clear');
$m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list