[Rt-commit] r15912 - in rt/3.8/trunk: t/web
sartak at bestpractical.com
sartak at bestpractical.com
Thu Sep 11 04:43:13 EDT 2008
Author: sartak
Date: Thu Sep 11 04:43:10 2008
New Revision: 15912
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/t/web/dashboards-groups.t
Log:
r71639 at onn: sartak | 2008-09-11 04:41:17 -0400
The first warning test: dashboards-groups which only throws one warning, Permission denied, and it's expected
Modified: rt/3.8/trunk/t/web/dashboards-groups.t
==============================================================================
--- rt/3.8/trunk/t/web/dashboards-groups.t (original)
+++ rt/3.8/trunk/t/web/dashboards-groups.t Thu Sep 11 04:43:10 2008
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 36;
+use Test::More tests => 41;
use RT::Test;
my ($baseurl, $m) = RT::Test->started_ok;
@@ -86,10 +86,16 @@
is($dashboard->Privacy, 'RT::Group-' . $inner_group->Id, "correct privacy");
is($dashboard->PossibleHiddenSearches, 0, "all searches are visible");
+is($m->get_warnings, 0, "no warnings yet");
+
$m->get_ok("/Dashboards/Modify.html?id=$id");
$m->content_lacks("inner dashboard", "no SeeGroupDashboard right");
$m->content_contains("Permission denied");
+my @warnings = $m->get_warnings;
+is(@warnings, 1, "no warnings yet");
+like($warnings[0], qr/Permission denied/, "got a permission denied warning");
+
$user_obj->PrincipalObj->GrantRight(Right => 'SeeGroupDashboard', Object => $inner_group);
$m->get_ok("/Dashboards/Modify.html?id=$id");
$m->content_contains("inner dashboard", "we now have SeeGroupDashboard right");
More information about the Rt-commit
mailing list