[Rt-commit] rt branch, admin_ui, updated. fa83b270187ec7cc598fab023dec7bb43897acac
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Fri Jan 15 03:59:51 EST 2010
The branch, admin_ui has been updated
via fa83b270187ec7cc598fab023dec7bb43897acac (commit)
from 8d1976f07e724d07c7b48e88bce89ed7560ab974 (commit)
Summary of changes:
t/web/admin/lists.t | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
create mode 100644 t/web/admin/lists.t
- Log -----------------------------------------------------------------
commit fa83b270187ec7cc598fab023dec7bb43897acac
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Jan 15 16:59:40 2010 +0800
admin lists test
diff --git a/t/web/admin/lists.t b/t/web/admin/lists.t
new file mode 100644
index 0000000..eae66dd
--- /dev/null
+++ b/t/web/admin/lists.t
@@ -0,0 +1,72 @@
+#!/usr/bin/env perl
+
+use strict;
+use RT::Test strict => 0, tests => 36, l10n => 1;
+
+my ( $baseurl, $agent ) = RT::Test->started_ok;
+ok( $agent->login, 'logged in' );
+
+my $root = RT::Model::User->new( current_user => RT->system_user );
+ok( $root->load('root'), 'load user root' );
+
+$agent->get_ok('/admin/');
+for my $type (qw/Users Groups Queues CustomFields Global Tools/) {
+ my $path = $type eq 'CustomFields' ? 'custom_fields' : lc $type;
+ ok(
+ $agent->find_link(
+ text => $type eq 'CustomFields' ? 'Custom Fields' : $type,
+ url_regex => qr!/admin/$path!
+ ),
+ "found $type link",
+ );
+ $agent->follow_link_ok(
+ {
+ text => $type eq 'CustomFields' ? 'Custom Fields' : $type,
+ url_regex => qr!/admin/$path!
+ },
+ "follow $type link"
+ );
+ $agent->back;
+}
+
+my %map = (
+ Jifty => 'config_jifty',
+ 'Group Rights' => 'group_rights',
+ 'User Rights' => 'user_rights',
+ 'Custom Fields' => 'select_custom_fields',
+ 'RT at a glance' => 'my_rt',
+);
+
+$agent->get_ok('/admin/global/');
+for my $type ( qw/Templates Workflows System/, keys %map ) {
+ my $path = $map{$type} || lc $type;
+ ok(
+ $agent->find_link(
+ text => $type,
+ url_regex => qr{/admin/global/$path}
+ ),
+ "found global $type link",
+ );
+ $agent->follow_link_ok(
+ { text => $type, url_regex => qr{/admin/global/$path} },
+ "follow global $type link",
+ );
+ $agent->back;
+}
+
+$agent->get_ok('/admin/tools/');
+ok(
+ $agent->find_link(
+ text => 'System Configuration',
+ url_regex => qr{/admin/tools/configuration}
+ ),
+ "found System Configuration link",
+);
+$agent->follow_link_ok(
+ {
+ text => 'System Configuration',
+ url_regex => qr{/admin/tools/configuration}
+ },
+ "found System Configuration link",
+);
+
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list