[Rt-commit] r4927 - rtir/branches/1.9-EXPERIMENTAL/t
glasser at bestpractical.com
glasser at bestpractical.com
Fri Mar 31 13:53:12 EST 2006
Author: glasser
Date: Fri Mar 31 13:53:11 2006
New Revision: 4927
Added:
rtir/branches/1.9-EXPERIMENTAL/t/004-rtfm-in-rtir.t
Log:
add some tests for RTIR/RTFM integration
Added: rtir/branches/1.9-EXPERIMENTAL/t/004-rtfm-in-rtir.t
==============================================================================
--- (empty file)
+++ rtir/branches/1.9-EXPERIMENTAL/t/004-rtfm-in-rtir.t Fri Mar 31 13:53:11 2006
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Test::More 'no_plan';
+
+require "t/rtir-test.pl";
+
+my $agent = default_agent();
+
+my $ir_id = create_ir($agent, {Subject => "looking for rtfm"});
+
+display_ir($agent, $ir_id);
+
+$agent->follow_link_ok({text => "RTFM"}, "followed 'RTFM' overview link");
+$agent->title_like(qr/Overview/);
+
+$agent->back();
+
+$agent->follow_link_ok({text => "New", url_regex => qr/RTFM/}, "followed new RTFM article link");
+
+$agent->follow_link_ok({text => "in class Templates"}, "chose a class");
+
+$agent->form_name("EditArticle");
+
+my $article_name = "some article".rand();
+
+$agent->field(Name => $article_name);
+$agent->field(Summary => "this is a summary");
+$agent->submit();
+
+is($agent->status, 200, "attempt to create succeeded");
+
+like($agent->content, qr/Incident Report #\d+: looking for rtfm/, "back on IR page");
+
+$agent->follow_link_ok({text => $article_name}, "back to article");
+like($agent->content, qr/this is a summary/, "found the summary of the article");
More information about the Rt-commit
mailing list