[Bps-public-commit] r17083 - sd/trunk/lib/App/SD
ruz at bestpractical.com
ruz at bestpractical.com
Wed Dec 3 05:19:20 EST 2008
Author: ruz
Date: Wed Dec 3 05:19:19 2008
New Revision: 17083
Modified:
sd/trunk/lib/App/SD/Test.pm
Log:
* add update_ticket_ok
Modified: sd/trunk/lib/App/SD/Test.pm
==============================================================================
--- sd/trunk/lib/App/SD/Test.pm (original)
+++ sd/trunk/lib/App/SD/Test.pm Wed Dec 3 05:19:19 2008
@@ -9,7 +9,7 @@
use File::Temp ();
use Cwd qw/getcwd/;
use base qw/Exporter/;
-our @EXPORT = qw(create_ticket_ok create_ticket_with_editor_ok create_ticket_comment_ok get_uuid_for_luid get_luid_for_uuid get_ticket_info);
+our @EXPORT = qw(create_ticket_ok update_ticket_ok create_ticket_with_editor_ok create_ticket_comment_ok get_uuid_for_luid get_luid_for_uuid get_ticket_info);
delete $ENV{'PROPHET_APP_CONFIG'};
$ENV{'EDITOR'} = '/bin/true';
@@ -44,7 +44,23 @@
return ( $luid, $uuid );
}
-=head2 create_ticket_ok ARGS
+=head2 update_ticket_ok ID ARGS
+
+Updates the ticket #ID, passing ARGS along to the update command.
+
+Returns nothing interesting.
+
+=cut
+
+sub update_ticket_ok {
+ my ($id, @args) = (@_);
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+ Prophet::Test::run_output_matches( 'sd', [ 'ticket', 'update', $id, '--', @args ],
+ [qr/ticket \d+\s+\([^)]*\)\s+updated\./]
+ );
+}
+
+=head2 create_ticket_comment_ok ARGS
Creates a new ticket comment, passing ARGS along to the creation command.
More information about the Bps-public-commit
mailing list