[Jifty-commit] jifty branch, master, updated. b33505cdb6f10c416673dc556b8fd4b79f0ac3f3
Jifty commits
jifty-commit at lists.jifty.org
Wed Jan 13 02:30:54 EST 2010
The branch, master has been updated
via b33505cdb6f10c416673dc556b8fd4b79f0ac3f3 (commit)
from 9ade22e983fe986b282489ed8add00bf745273e2 (commit)
Summary of changes:
lib/Jifty/Test/WWW/Mechanize.pm | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit b33505cdb6f10c416673dc556b8fd4b79f0ac3f3
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 13 15:30:41 2010 +0800
add description support for follow_link_ok
diff --git a/lib/Jifty/Test/WWW/Mechanize.pm b/lib/Jifty/Test/WWW/Mechanize.pm
index 1eb037c..fb0c9b0 100644
--- a/lib/Jifty/Test/WWW/Mechanize.pm
+++ b/lib/Jifty/Test/WWW/Mechanize.pm
@@ -429,22 +429,24 @@ sub follow_link_ok {
my $self = shift;
+ my $desc;
+
# 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' } ...
-
+ $desc = $_[1] if $_[1];
@_ = %{$_[0]};
} elsif (@_ % 2 ) {
# IF the user is passing in text => 'foo' ,"Cicked the right thing"
# Remove reason from end if it's there
- pop @_ ;
-
+ $desc = pop @_ ;
}
+
carp("Couldn't find link") unless $self->follow_link(@_);
{
local $Test::Builder::Level = $Test::Builder::Level;
$Test::Builder::Level++;
- Test::HTML::Lint::html_ok( $lint, $self->content );
+ Test::HTML::Lint::html_ok( $lint, $self->content, $desc );
}
}
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list