[Rt-commit] r5116 - rt/branches/3.4-RELEASE/lib/t/regression
ruz at bestpractical.com
ruz at bestpractical.com
Tue Apr 25 19:35:10 EDT 2006
Author: ruz
Date: Tue Apr 25 19:35:09 2006
New Revision: 5116
Modified:
rt/branches/3.4-RELEASE/lib/t/regression/23-web_attachments.t
Log:
* get queue ID from page
Modified: rt/branches/3.4-RELEASE/lib/t/regression/23-web_attachments.t
==============================================================================
--- rt/branches/3.4-RELEASE/lib/t/regression/23-web_attachments.t (original)
+++ rt/branches/3.4-RELEASE/lib/t/regression/23-web_attachments.t Tue Apr 25 19:35:09 2006
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 16;
+use Test::More tests => 15;
use RT;
RT::LoadConfig;
RT::Init;
@@ -12,21 +12,20 @@
use constant LogoFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif';
use constant FaviconFile => $RT::MasonComponentRoot .'/NoAuth/images/favicon.png';
+my $queue_name = 'General';
+
my $m = Test::WWW::Mechanize->new;
isa_ok($m, 'Test::WWW::Mechanize');
+$m->get_ok( $BaseURL."?user=root;pass=password" );
+$m->content_like(qr/Logout/, 'we did log in');
+
my $qid;
{
- use_ok('RT::Queue');
- my $queue = RT::Queue->new( $RT::SystemUser );
- $queue->Load('General');
- plan skip_all => "you have no queue 'General'" unless $queue->id;
- ok($qid = $queue->id, 'found id of the general queue');
+ $m->content =~ /<SELECT\s+NAME\s*="Queue">.*?<OPTION\s+VALUE="(\d+)"\s*\d*>\s*\Q$queue_name\E\s*<\/OPTION>/msi;
+ ok( $qid = $1, "found id of the '$queue_name' queue");
}
-$m->get_ok( $BaseURL."?user=root;pass=password" );
-$m->content_like(qr/Logout/, 'we did log in');
-
$m->form_number(1);
$m->field('Queue', $qid);
$m->submit;
More information about the Rt-commit
mailing list