[Rt-commit] rt branch, 4.0/validate-dashboard-args, updated. rt-4.0.0rc6-129-gfce921b
Shawn Moore
sartak at bestpractical.com
Wed Mar 9 12:25:40 EST 2011
The branch, 4.0/validate-dashboard-args has been updated
via fce921b040f2df02e3e3d29f3575c6c41ad2fe4d (commit)
from 2ed6c6800c72f6f37b1f8fea47c576303a4d7989 (commit)
Summary of changes:
t/web/dashboards-basics.t | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit fce921b040f2df02e3e3d29f3575c6c41ad2fe4d
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Mar 9 12:24:37 2011 -0500
Test that bad IDs propagate into actual errors
diff --git a/t/web/dashboards-basics.t b/t/web/dashboards-basics.t
index ca3134f..1d56da5 100644
--- a/t/web/dashboards-basics.t
+++ b/t/web/dashboards-basics.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test tests => 110;
+use RT::Test tests => 122;
my ($baseurl, $m) = RT::Test->started_ok;
my $url = $m->rt_base_url;
@@ -257,3 +257,12 @@ $omech->content_lacks("dashboard test", "matched ticket doesn't show up");
$omech->warning_like(qr/User .* tried to load container user /, "can't see other users' personal searches");
+# make sure that navigating to dashboard pages with bad IDs throws an error
+my ($bad_id) = $personal =~ /^search-(\d+)/;
+
+for my $page (qw/Modify Queries Render Subscription/) {
+ $m->get("/Dashboards/$page.html?id=$bad_id");
+ $m->content_like(qr/Couldn.+t load dashboard $bad_id: Invalid object type/);
+ $m->warning_like(qr/Couldn't load dashboard $bad_id: Invalid object type/);
+}
+
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list