Displaying 3 results from an estimated 3 matches for "successful_login".
2008 Aug 30
3
Working with sessions in beast forum
...assword_authentication params[:login], params[:password]
end
end
protected
def open_id_authentication
authenticate_with_open_id params[:openid_url] do |result,
openid_url|
if result.successful?
if self.current_user = User.find_by_openid_url(openid_url)
successful_login
else
failed_login "Sorry, no user by the identity URL
{openid_url} exists"[:openid_no_user_message, openid_url.inspect]
end
else
failed_login result.message
end
end
end
def password_authentication(name, password)...
2008 May 27
6
case...when statement bug when using openid_authentication?
...t;Sorry, the OpenID verification failed"
when :successful
logger.debug "Correct!"
if @current_user =
@account.users.find_by_identity_url(identity_url)
assign_registration_attributes!(registration)
if current_user.save
successful_login
else
failed_login "Your OpenID profile registration failed: " +
@current_user.errors.full_messages.to_sentence
end
else
failed_login "Sorry, no user by that identity URL exists"
end
els...
2006 Jun 14
9
Controller testing and mocks...
So far I''ve been doing my controller testing against "real" (testing)
objects; however, I''ve been beginning to wonder if I should "default" to
using mocks in most cases -- both for performence and to enforce a
looser coupling.
In part this is driven by my viewpoint that rail''s "functional" tests
are still "unit" tests, so they