[Rt-commit] r6020 - in rtir/branches/2.1-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Fri Sep 22 17:57:00 EDT 2006
Author: ruz
Date: Fri Sep 22 17:56:59 2006
New Revision: 6020
Modified:
rtir/branches/2.1-EXPERIMENTAL/ (props changed)
rtir/branches/2.1-EXPERIMENTAL/t/rtir-test.pl
Log:
r1616 at cubic-pc: cubic | 2006-09-23 01:57:39 +0400
* new function get_ticket_id in utils for tests
Modified: rtir/branches/2.1-EXPERIMENTAL/t/rtir-test.pl
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/t/rtir-test.pl (original)
+++ rtir/branches/2.1-EXPERIMENTAL/t/rtir-test.pl Fri Sep 22 17:56:59 2006
@@ -199,14 +199,19 @@
is ($agent->status, 200, "Attempted to create the ticket");
# Now see if we succeeded
+ my $id = get_ticket_id($agent);
+ ok ($id, "Ticket $id created successfully.");
+
+ return $id;
+}
+
+sub get_ticket_id {
+ my $agent = shift;
my $content = $agent->content();
- my $id = -1;
+ my $id = 0;
if ($content =~ /.*Ticket (\d+) created.*/g) {
$id = $1;
}
-
- ok ($id > 0, "Ticket $id created successfully.");
-
return $id;
}
More information about the Rt-commit
mailing list