[Jifty-commit] r4560 - in jifty/trunk: lib/Jifty/Test/WWW
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Nov 28 18:39:45 EST 2007
Author: jesse
Date: Wed Nov 28 18:39:44 2007
New Revision: 4560
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm
Log:
r72432 at pinglin: jesse | 2007-11-28 18:34:07 -0500
* Somewhat more correct handling of follow_link_ok. (Better compat with WWW::Mechanize's syntax)
Modified: jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm (original)
+++ jifty/trunk/lib/Jifty/Test/WWW/Mechanize.pm Wed Nov 28 18:39:44 2007
@@ -413,12 +413,17 @@
sub follow_link_ok {
my $self = shift;
- # Remove reason from end if it's there
- pop @_ if @_ % 2;
# Test::WWW::Mechanize allows passing in a hashref of arguments, so we should to
if ( ref($_[0]) eq 'HASH') {
+ # if the user is pashing in { text => 'foo' } ...
+
@_ = %{$_[0]};
+ } elsif (@_ % 2 ) {
+ # IF the user is passing in text => 'foo' ,"Cicked the right thing"
+ # Remove reason from end if it's there
+ pop @_ ;
+
}
carp("Couldn't find link") unless $self->follow_link(@_);
{
More information about the Jifty-commit
mailing list