fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-04-13 03:05 pm

[dw-free] fix the rest of the console-* tests

[commit: http://hg.dwscoalition.org/dw-free/rev/25ed51e06a2c]

http://bugs.dwscoalition.org/show_bug.cgi?id=2487

Tests cleanup.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/Console/Command/SetBadpassword.pm
  • t/console-setbadpassword.t
--------------------------------------------------------------------------------
diff -r 366f934766bd -r 25ed51e06a2c cgi-bin/LJ/Console/Command/SetBadpassword.pm
--- a/cgi-bin/LJ/Console/Command/SetBadpassword.pm	Tue Apr 13 08:05:56 2010 -0700
+++ b/cgi-bin/LJ/Console/Command/SetBadpassword.pm	Tue Apr 13 08:10:11 2010 -0700
@@ -86,7 +86,7 @@ sub execute {
     });
 
     $self->error("Running of hook failed!")
-        if $on && !$hres;
+        if $on && !$hres && LJ::Hooks::are_hooks( 'set_badpassword' );
 
     return 1;
 }
diff -r 366f934766bd -r 25ed51e06a2c t/console-setbadpassword.t
--- a/t/console-setbadpassword.t	Tue Apr 13 08:05:56 2010 -0700
+++ b/t/console-setbadpassword.t	Tue Apr 13 08:10:11 2010 -0700
@@ -7,8 +7,7 @@ use LJ::Test qw (temp_user temp_comm tem
 use LJ::Test qw (temp_user temp_comm temp_feed memcache_stress);
 local $LJ::T_NO_COMMAND_PRINT = 1;
 
-#plan tests => 5;
-plan skip_all => 'Fix this test!';
+plan tests => 5;
 
 my $u = temp_user();
 my $u2 = temp_user();
--------------------------------------------------------------------------------