diff options
Diffstat (limited to 'perllib/FixMyStreet/TestMech.pm')
-rw-r--r-- | perllib/FixMyStreet/TestMech.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/TestMech.pm b/perllib/FixMyStreet/TestMech.pm index 3dd4e84e9..9913f5cde 100644 --- a/perllib/FixMyStreet/TestMech.pm +++ b/perllib/FixMyStreet/TestMech.pm @@ -14,7 +14,6 @@ use Test::More; use Web::Scraper; use Carp; use Email::Send::Test; -use Digest::SHA1 'sha1_hex'; use JSON; =head1 NAME @@ -89,8 +88,8 @@ sub log_in_ok { my $user = $mech->create_user_ok($email); # store the old password and then change it - my $old_password_sha1 = $user->password; - $user->update( { password => sha1_hex('secret') } ); + my $old_password = $user->password; + $user->update( { password => 'secret' } ); # log in $mech->get_ok('/auth'); @@ -100,7 +99,7 @@ sub log_in_ok { $mech->logged_in_ok; # restore the password (if there was one) - $user->update( { password => $old_password_sha1 } ) if $old_password_sha1; + $user->update( { password => $old_password } ) if $old_password; return $user; } |