[Rt-commit] r18078 - in rt/3.999/branches/merge_to_3.8.2: t/web
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 29 23:22:01 EST 2009
Author: sunnavy
Date: Thu Jan 29 23:22:00 2009
New Revision: 18078
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/t/web/command_line.t
Log:
r19337 at sunnavys-mb: sunnavy | 2009-01-30 09:50:43 +0800
merged t/web/command_line.t
Modified: rt/3.999/branches/merge_to_3.8.2/t/web/command_line.t
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/t/web/command_line.t (original)
+++ rt/3.999/branches/merge_to_3.8.2/t/web/command_line.t Thu Jan 29 23:22:00 2009
@@ -3,7 +3,7 @@
use strict;
use Test::Expect;
use File::Spec ();
-use Test::More tests => 241;
+use Test::More tests => 243;
use RT::Test;
my ($baseurl, $m) = RT::Test->started_ok;
@@ -183,7 +183,7 @@
expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
expect_send("show ticket/$ticket_id -f 'CF-my CF$$'", 'Checking new value');
expect_like(qr/CF\.{my CF$$}: value/i, 'Verified change');
-expect_send("ls 'id = $ticket_id' -f 'CF-my CF$$'", 'Checking new value');
+expect_send("ls -l 'id = $ticket_id' -f 'CF-my CF$$'", 'Checking new value');
expect_like(qr/CF\.{my CF$$}: value/i, 'Verified change');
expect_send("show ticket/$ticket_id -f 'CF.{my CF$$}'", 'Checking initial value');
@@ -192,7 +192,7 @@
expect_like(qr/Ticket $ticket_id updated/, 'Changed cf');
expect_send("show ticket/$ticket_id -f 'CF.{my CF$$}'", 'Checking new value');
expect_like(qr/CF\.{my CF$$}: NEW/i, 'Verified change');
-expect_send("ls 'id = $ticket_id' -f 'CF.{my CF$$}'", 'Checking new value');
+expect_send("ls -l 'id = $ticket_id' -f 'CF.{my CF$$}'", 'Checking new value');
expect_like(qr/CF\.{my CF$$}: NEW/i, 'Verified change');
# ...
@@ -225,7 +225,7 @@
expect_send("ls -l -t ticket -o +id \"Status='resolved'\"", 'Listing resolved tickets verbosely...');
expect_like(qr/id: ticket\/$ticket_id/, 'Found our ticket');
# show ticket
-expect_send("show -t ticket $ticket_id", 'Showing our ticket...');
+expect_send("show -s -t ticket $ticket_id", 'Showing our ticket...');
expect_like(qr/id: ticket\/$ticket_id/, 'Got our ticket');
# show ticket history
expect_send("show ticket/$ticket_id/history", 'Showing our ticket\'s history...');
@@ -238,14 +238,14 @@
expect_like(qr/Ticket Created by root/, 'Got our history');
}
# get attachments from a ticket
-expect_send("show ticket/$ticket_id/attachments", 'Showing ticket attachments...');
+expect_send("show -s ticket/$ticket_id/attachments", 'Showing ticket attachments...');
expect_like(qr/id: ticket\/$ticket_id\/attachments/, 'Got our ticket\'s attachments');
expect_like(qr/Attachments: \d+: \(Unnamed\) \(\S+ \/ \d+\w+\)/, 'Our ticket has an attachment');
expect_handle->before() =~ /Attachments: (\d+): \(Unnamed\) \((\S+)/;
my $attachment_id = $1;
my $attachment_type = $2;
ok($attachment_id, "Got attachment id=$attachment_id $attachment_type");
-expect_send("show ticket/$ticket_id/attachments/$attachment_id", "Showing attachment $attachment_id...");
+expect_send("show -s ticket/$ticket_id/attachments/$attachment_id", "Showing attachment $attachment_id...");
expect_like(qr/content_type: $attachment_type/, 'Got the attachment');
# }}}
@@ -335,6 +335,12 @@
ok($merge_ticket_B, "Got second ticket to merge id=$merge_ticket_B");
expect_send("merge $merge_ticket_B $merge_ticket_A", 'Merging the tickets...');
expect_like(qr/Merge completed/, 'Merged the tickets');
+
+TODO: {
+ local $TODO = "we generate a spurious warning here";
+ $m->no_warnings_ok;
+}
+
expect_send("show ticket/$merge_ticket_A/history", 'Checking merge on first ticket');
expect_like(qr/Merged into ticket #$merge_ticket_A by root/, 'Merge recorded in first ticket');
expect_send("show ticket/$merge_ticket_B/history", 'Checking merge on second ticket');
@@ -426,7 +432,7 @@
# create link
expect_send("link $link1_id $reln $link2_id", "Link by $reln...");
expect_like(qr/Created link $link1_id $reln $link2_id/, 'Linked');
- expect_send("show ticket/$link1_id/links", "Checking creation of $reln...");
+ expect_send("show -s ticket/$link1_id/links", "Checking creation of $reln...");
expect_like(qr/$display_relns{$reln}: [\w\d\.\-]+:\/\/[\w\d\.]+\/ticket\/$link2_id/, "Created link $reln");
# delete link
More information about the Rt-commit
mailing list