RT 4.0.13
[freeside.git] / rt / t / web / command_line.t
index 394daab..7c444f4 100644 (file)
@@ -1,9 +1,8 @@
-#!/usr/bin/perl -w
-
 use strict;
+use warnings;
 use File::Spec ();
 use Test::Expect;
-use RT::Test tests => 315, actual_server => 1;
+use RT::Test tests => undef, actual_server => 1;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 use RT::User;
@@ -83,6 +82,16 @@ TODO: {
     expect_like(qr/$queue_id: EditedQueue$$/, 'Found the queue');
 }
 
+# Queues with spaces in their names
+expect_send("create -t queue set Name='Spaced Out'", 'Creating a queue...');
+expect_like(qr/Queue \d+ created/, 'Created the queue');
+expect_handle->before() =~ /Queue (\d+) created/;
+my $other_queue = $1;
+ok($other_queue, "Got queue id=$other_queue");
+expect_send("show 'queue/Spaced Out'", 'Showing the queue...');
+expect_like(qr/id: queue\/$other_queue/, 'Saw the queue');
+expect_like(qr/Name: Spaced Out/, 'Saw the modification');
+
 
 
 # Set up a custom field for editing tests
@@ -536,4 +545,7 @@ sub check_attachment {
 my @warnings = grep { $_ !~ /\$ampm/ } $m->get_warnings;
 is( scalar @warnings, 0, 'no extra warnings' );
 
+undef $m;
+done_testing;
+
 1; # needed to avoid a weird exit value from expect_quit