Does anybody know how to make a functional test for this controller :
def create user = User.authenticate(params[:email], params[:password]) if user session[:user_id] = user.id redirect_to root_url, :notice => "Logged in!" else flash.now.alert = "Invalid email or password" render "new" end end
def destroy session[:user_id] = nil redirect_to root_url, :notice => "Logged out!" end
I am so confused, because i am a newbie to ROR, please help me, (urgent!)