
sunnavy at bestpractical
Nov 5, 2009, 7:28 PM
Post #1 of 1
(129 views)
Permalink
|
|
rt branch, 3.999-trunk, updated. 7e36049dd282388af0b4d98bd22e274043774b85
|
|
The branch, 3.999-trunk has been updated via 7e36049dd282388af0b4d98bd22e274043774b85 (commit) from 5fe2e74c6f5d127fa74132df4620c870212533b8 (commit) Summary of changes: t/web/dashboards-groups.t | 2 +- t/web/dashboards.t | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) - Log ----------------------------------------------------------------- commit 7e36049dd282388af0b4d98bd22e274043774b85 Author: sunnavy <sunnavy [at] bestpractical> Date: Fri Nov 6 11:27:45 2009 +0800 update tests: showing the user an error un the webui with /Elements/Error, like "permission denied" or "no such ticket" no longer issues an "error" log entry diff --git a/t/web/dashboards-groups.t b/t/web/dashboards-groups.t index b79e660..c62d6f1 100644 --- a/t/web/dashboards-groups.t +++ b/t/web/dashboards-groups.t @@ -94,7 +94,7 @@ $m->get_ok("/Dashboards/Modify.html?id=$id"); $m->content_lacks("inner dashboard", "no SeeGroupDashboard right"); $m->content_contains("Permission denied"); -$m->warnings_like(qr/Permission denied/, "got a permission denied warning"); +$m->no_warnings_ok; $user_obj->principal->grant_right(right => 'SeeGroupDashboard', object => $inner_group); $m->get_ok("/Dashboards/Modify.html?id=$id"); diff --git a/t/web/dashboards.t b/t/web/dashboards.t index d5d7355..5a42deb 100644 --- a/t/web/dashboards.t +++ b/t/web/dashboards.t @@ -50,7 +50,8 @@ $m->get_ok($url."/Dashboards/Modify.html?create=1"); $m->content_contains("Permission denied"); $m->content_lacks("Save Changes"); -$m->warnings_like(qr/Permission denied/, "got a permission denied warning"); +# permission denied is not error in RT +$m->no_warnings_ok; $user_obj->principal->grant_right( right => 'CreateOwnDashboard', @@ -150,7 +151,7 @@ $m->get_ok("/Dashboards/Subscription.html?dashboard_id=$id"); $m->form_name( 'subscribe_dashboard' ); $m->click_button(name => 'save'); $m->content_contains("Permission denied"); -$m->warnings_like(qr/Unable to subscribe to dashboard.*Permission denied/, "got a permission denied warning when trying to subscribe to a dashboard"); +$m->no_warnings_ok; Jifty::DBI::Record::Cachable->flush_cache; is($user_obj->attributes->named('Subscription'), 0, "no subscriptions"); @@ -181,7 +182,7 @@ $m->content_contains("Modify the subscription to dashboard different dashboard") $m->get_ok("/Dashboards/Modify.html?id=$id&delete=1"); $m->content_contains("Permission denied", "unable to delete dashboard because we lack DeleteOwnDashboard"); -$m->warnings_like(qr/Couldn't delete dashboard.*Permission denied/, "got a permission denied warning when trying to delete the dashboard"); +$m->no_warnings_ok; $user_obj->principal->grant_right(right => 'DeleteOwnDashboard', object => RT->system ); $m->get_ok("/Dashboards/Modify.html?id=$id"); @@ -194,7 +195,7 @@ $m->content_contains("Deleted dashboard $id"); $m->get("/Dashboards/Modify.html?id=$id"); $m->content_lacks("different dashboard", "dashboard was deleted"); $m->content_contains("Failed to load dashboard $id"); -$m->warnings_like(qr/Failed to load dashboard.*Couldn't find row/, "the dashboard was deleted"); +$m->no_warnings_ok; $user_obj->principal->grant_right(right => "SuperUser", object => RT->system); ----------------------------------------------------------------------- _______________________________________________ Rt-commit mailing list Rt-commit [at] lists http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
|