Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Commit

rt branch, create-action, updated. d59d9d05883437cc2c8c999b537fccc2c9b406cf

 

 

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded


sartak at bestpractical

Nov 17, 2009, 12:16 PM

Post #1 of 1 (158 views)
Permalink
rt branch, create-action, updated. d59d9d05883437cc2c8c999b537fccc2c9b406cf

The branch, create-action has been updated
via d59d9d05883437cc2c8c999b537fccc2c9b406cf (commit)
from 89d0c2ac181e8eb1bfbdfa892e5a65a1f1dc701c (commit)

Summary of changes:
t/web/basic.t | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit d59d9d05883437cc2c8c999b537fccc2c9b406cf
Author: Shawn M Moore <sartak [at] bestpractical>
Date: Tue Nov 17 15:15:54 2009 -0500

Jifty-style form handling in basic.t

diff --git a/t/web/basic.t b/t/web/basic.t
index f8bd14e..9853781 100644
--- a/t/web/basic.t
+++ b/t/web/basic.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl

use strict;
-use RT::Test strict => 1, tests => 21, l10n => 1;
+use RT::Test strict => 1, tests => 23, l10n => 1;
use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
@@ -37,22 +37,24 @@ is($agent->{'status'}, 200, "Fetched the page ok");
ok( $agent->content =~ /Logout/i, "Found a logout link");
$agent->get($url."/ticket/create?queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
-$agent->form_number(3);
# Start with a string containing characters in latin1
my $string = "I18N Web Testing æøå";
my $decoded_string = Encode::decode_utf8($string);
-$agent->field('subject' => "Ticket with utf8 body");
-$agent->field('content' => $decoded_string);
+$agent->fill_in_action_ok('create_ticket', (
+ 'subject' => "Ticket with utf8 body",
+ 'content' => $decoded_string,
+));
+
ok($agent->submit(), "Created new ticket with $string as content");
like( $agent->{'content'}, qr{$string} , "Found the content");
ok($agent->{redirected_uri}, "Did redirection");

$agent->get($url."/ticket/create?queue=1");
is ($agent->{'status'}, 200, "Loaded Create.html");
-$agent->form_number(3);
-
-$agent->field('subject' => $decoded_string);
-$agent->field('content' => "Ticket with utf8 subject");
+$agent->fill_in_action_ok('create_ticket', (
+ 'subject' => $decoded_string,
+ 'content' => "Ticket with utf8 subject",
+));
ok($agent->submit(), "Created new ticket with $string as subject");
like( $agent->{'content'}, qr{$string} , "Found the content");


-----------------------------------------------------------------------

Request Tracker commit RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.