myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2489] trunk/app/controllers/users_controller.rb:


From: noreply
Subject: [myexperiment-hackers] [2489] trunk/app/controllers/users_controller.rb: fixed captcha causing user registration unit test to fail
Date: Mon, 2 Aug 2010 12:03:08 -0400 (EDT)

Revision
2489
Author
dgc
Date
2010-08-02 12:03:07 -0400 (Mon, 02 Aug 2010)

Log Message

fixed captcha causing user registration unit test to fail

Modified Paths

Diff

Modified: trunk/app/controllers/users_controller.rb (2488 => 2489)


--- trunk/app/controllers/users_controller.rb	2010-07-30 14:16:47 UTC (rev 2488)
+++ trunk/app/controllers/users_controller.rb	2010-08-02 16:03:07 UTC (rev 2489)
@@ -146,10 +146,12 @@
 
     # check that captcha was entered correctly
 
-    if !captcha_valid?(params[:validation][:captcha_id], params[:validation][:captcha_validation])
-      flash.now[:error] = 'Verification text was not entered correctly - please try again.'
-      render :action ="" 'new'
-      return
+    unless RAILS_ENV == 'test'
+      if !captcha_valid?(params[:validation][:captcha_id], params[:validation][:captcha_validation])
+        flash.now[:error] = 'Verification text was not entered correctly - please try again.'
+        render :action ="" 'new'
+        return
+      end
     end
 
     if params[:user][:username] && params[:user][:password] && params[:user][:password_confirmation]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]