[Rt-commit] rt branch, master, updated. rt-4.1.19-62-g8b422f5
Alex Vandiver
alexmv at bestpractical.com
Mon Aug 26 16:46:46 EDT 2013
The branch, master has been updated
via 8b422f544541cf3a003c3c2e3c01a7c964738c7f (commit)
via 4c528983ec39e3a91bc1fe195ef716e68aacb1cf (commit)
via 0d91e608bb052b73b57a449761f46857fc114b10 (commit)
via 7dd73f5909dbc2b7243a404cee95d2dc97fb545c (commit)
via 778713aca904be350cff389a4009f9ec702d732a (commit)
via 7e99f2ad0b1cff6af4f919ccdb1155fe6c30ab49 (commit)
via e0508d54c4590dd017e3c30d220a3ea882dfae13 (commit)
via 146ed3dfc27af7837524f8f19585a028128bd0d5 (commit)
via 270d1bb80e65a9a01188ea19b4b3c57330d4c986 (commit)
via 5a5579867ae459ce3c55571450a501220ba9b3a8 (commit)
via fc961e7117aaaf0878ddd260c9b3e854354549d1 (commit)
via 58b7e4f213a5a01db416b8b918c575ec4a7071d6 (commit)
via fb6ea9a932fb73981c3bddb65aa042e8941f46cb (commit)
via a6f3c3148b31d2b8ae78883521461e91d69df467 (commit)
via a6cdd8e510c793d4361f18bce2e83a6c726f9c58 (commit)
via 647bb5335694fda0c848ef3f979c63e0d9cc5f64 (commit)
via d11a243fc646af9634d0796721799fd6c0f997f0 (commit)
via f83cd933c5cfc46d40ddd44742b5656348f613a4 (commit)
via 2c8ed76665d5536df7d76bdb10a7f2dee92b8082 (commit)
via c1db686026b0861ce76f1b74aa5107c467aaf282 (commit)
via f92e756e2b85e11c561b9643b9d31a333e78916c (commit)
via 28e48ff58071290dd71f4feb557c4ebbb2189ab6 (commit)
via 86609b80d0b3f1b2c890070e27ad880de8d0132f (commit)
via bb6f64cbe8706400bcb178843c68c39c72a865f7 (commit)
from f8b8b448adf9019644adff93e778c08b27cedec7 (commit)
Summary of changes:
etc/RT_Config.pm.in | 7 +++--
lib/RT/Articles.pm | 6 +++-
lib/RT/Date.pm | 9 +++++-
lib/RT/Pod/HTML.pm | 4 +++
lib/RT/Pod/HTMLBatch.pm | 10 +-----
lib/RT/Test.pm | 1 +
share/html/Elements/MakeClicky | 4 +--
share/html/Elements/QueueSummaryByLifecycle | 2 +-
share/html/Elements/QueueSummaryByStatus | 2 +-
share/html/Search/Chart.html | 2 +-
t/99-policy.t | 3 +-
t/api/date.t | 6 ++--
t/data/plugins/MakeClicky/html/makeclicky | 8 +++++
t/data/plugins/MakeClicky/lib/MakeClicky.pm | 2 ++
t/web/cf_date.t | 8 ++++-
t/web/cf_datetime.t | 7 ++++-
t/web/charting.t | 20 +++++++++++-
t/web/make-clicky.t | 49 +++++++++++++++++++++++++++++
18 files changed, 124 insertions(+), 26 deletions(-)
create mode 100644 t/data/plugins/MakeClicky/html/makeclicky
create mode 100644 t/data/plugins/MakeClicky/lib/MakeClicky.pm
create mode 100644 t/web/make-clicky.t
- Log -----------------------------------------------------------------
commit 8b422f544541cf3a003c3c2e3c01a7c964738c7f
Merge: f8b8b44 4c52898
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Aug 26 16:36:17 2013 -0400
Merge branch '4.0-trunk'
Conflicts:
t/web/charting.t
t/web/make-clicky.t
Switch deprecated EscapeUTF8 call to EscapeHTML
diff --cc t/99-policy.t
index 2b2e848,f4b80e8..468e87b
--- a/t/99-policy.t
+++ b/t/99-policy.t
@@@ -1,12 -1,12 +1,13 @@@
use strict;
use warnings;
-use RT::Test;
+use RT::Test tests => undef;
use File::Find;
+use IPC::Run3;
my @files;
- find( sub { push @files, $File::Find::name if -f },
+ find( { wanted => sub { push @files, $File::Find::name if -f },
+ no_chdir => 1 },
qw{etc lib share t bin sbin devel/tools} );
if ( my $dir = `git rev-parse --git-dir 2>/dev/null` ) {
# We're in a git repo, use the ignore list
diff --cc t/web/charting.t
index 8102dd2,e19ec41..9b76f61
--- a/t/web/charting.t
+++ b/t/web/charting.t
@@@ -83,4 -77,19 +83,22 @@@ $m->warning_like( qr{'Requestor\.Phone
is( $m->content_type, "image/png" );
ok( length($m->content), "Has content" );
- done_testing();
+ diag "Confirm subnav links use Query param before saved search in session.";
+
+ $m->get_ok( "/Search/Chart.html?Query=id>0" );
+ my $advanced = $m->find_link( text => 'Advanced' )->URI->equery;
+ like( $advanced, qr{Query=id%3E0},
+ 'Advanced link has Query param with id search'
+ );
+
+ # Load the session with another search.
+ $m->get_ok( "/Search/Results.html?Query=Queue='General'" );
+
+ $m->get_ok( "/Search/Chart.html?Query=id>0" );
+ $advanced = $m->find_link( text => 'Advanced' )->URI->equery;
+ like( $advanced, qr{Query=id%3E0},
+ 'Advanced link still has Query param with id search'
+ );
++
++undef $m;
++done_testing;
diff --cc t/web/make-clicky.t
index 0000000,6b7d49b..54181a5
mode 000000,100644..100644
--- a/t/web/make-clicky.t
+++ b/t/web/make-clicky.t
@@@ -1,0 -1,49 +1,49 @@@
+ use strict;
+ use warnings;
+
+ use RT::Test
+ tests => 'no_declare',
+ plugins => ["MakeClicky"],
+ config => 'Set( @Active_MakeClicky => "httpurl_overwrite" );';
+
+ use Test::LongString;
+
+ my ($base, $m) = RT::Test->started_ok;
+ $m->login;
+ $m->get_ok("/");
+
+ diag "Trailing punctuation";
+ {
+ my $url = 'http://bestpractical.com/rt';
+ for my $punc (qw( . ! ? ), ",") {
+ is_string(
+ make_clicky($m, "Refer to $url$punc A following sentence."),
+ qq[Refer to <span class="clickylink"><a target="new" href="$url">$url</a></span>$punc A following sentence.],
+ "$punc not included in url",
+ );
+ }
+ }
+
+ diag "Punctuation as part of the url";
+ {
+ my $url = 'http://bestpractical.com/rt/download.html?foo=bar,baz&bat=1.2';
+ my $escaped_url = $url;
- RT::Interface::Web::EscapeUTF8( \$escaped_url );
++ RT::Interface::Web::EscapeHTML( \$escaped_url );
+ is_string(
+ make_clicky($m, "Refer to $url. A following sentence."),
+ qq[Refer to <span class="clickylink"><a target="new" href="$escaped_url">$escaped_url</a></span>. A following sentence.],
+ "Punctuation in middle of URL",
+ );
+ }
+
+ sub make_clicky {
+ my $m = shift;
+ my $text = shift;
+ RT::Interface::Web::EscapeURI(\$text);
+ $m->get_ok("/makeclicky?content=$text", "made clicky")
+ or diag $m->status;
+ return $m->success ? $m->content : "";
+ }
+
+ undef $m;
+ done_testing();
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list