[Rt-commit] rt branch, admin_ui, updated. 6ed935b5938dc9feed24abe30d3a8a3a9f34305c

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jan 19 21:33:33 EST 2010


The branch, admin_ui has been updated
       via  6ed935b5938dc9feed24abe30d3a8a3a9f34305c (commit)
      from  32c906501a2971ac646651d78cc836a9c5bf66b9 (commit)

Summary of changes:
 t/web/admin/queues.t |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 6ed935b5938dc9feed24abe30d3a8a3a9f34305c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Jan 20 10:33:26 2010 +0800

    cf tests for queues

diff --git a/t/web/admin/queues.t b/t/web/admin/queues.t
index 88ab62c..8e2a3d5 100644
--- a/t/web/admin/queues.t
+++ b/t/web/admin/queues.t
@@ -1,15 +1,27 @@
 #!/usr/bin/env perl
 
 use strict;
-use RT::Test strict => 0, tests => 51, l10n => 1;
+use RT::Test strict => 0, tests => 55, 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' );
+my $queue_cf = RT::Model::CustomField->new( current_user => RT->system_user );
+ok(
+    $queue_cf->create(
+        name        => 'queue_cf',
+        type        => 'Freeform',
+        lookup_type => 'RT::Model::Queue',
+    ),
+    'created queue_cf'
+);
+$queue_cf->add_to_object(
+    RT::Model::Queue->new( current_user => RT->system_user ) );
 
 $agent->get_ok('/admin/queues/');
+$agent->content_contains('queue_cf', 'has queue_cf info');
 
 ok( $agent->find_link( text => 'General', url_regex => qr{\?id=\d+$}, ),
     "General link" );
@@ -34,14 +46,21 @@ $agent->follow_link_ok( { text => 'General', url_regex => qr{\?id=1} },
     'follow General link' );
 
 # Basics
-$agent->follow_link_ok( { text => 'Basics' }, 'follow Basic link' );
+$agent->follow_link_ok( { text => 'Basics', }, 'follow Basic link' );
 my $moniker = 'update_queue';
-$agent->fill_in_action_ok( $moniker, initial_priority => 30 );
+$agent->fill_in_action_ok(
+    $moniker,
+    initial_priority      => 30,
+    'cf_' . $queue_cf->id => 'queue_cf_foo',
+);
 $agent->submit;
 $agent->content_contains( 'Updated', 'updated queue' );
 my $queue = RT::Model::Queue->new( current_user => RT->system_user );
-ok( $queue->load('General'), 'load queue Generall' );
+ok( $queue->load('General'), 'load queue General' );
 is( $queue->initial_priority, 30, 'initial_priority is indeed updated' );
+$agent->follow_link_ok( { text => 'General', url_regex => qr{\?id=1} },
+    'follow General link' );
+$agent->content_contains('queue_cf_foo', 'has queue_cf_foo value');
 
 # Watchers
 $agent->follow_link_ok( { text => 'Watchers' }, 'follow Watchers link' );

-----------------------------------------------------------------------


More information about the Rt-commit mailing list