I am having trouble getting functional tests to working with restful
I have tried this:
require File.dirname(__FILE__) + '/../test_helper'
class UsersControllerTest < ActionController::TestCase
@controller = UsersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
# this works fine (which it should)
login_as(:someone) # 'someone' is set up in the users_fixture yaml
The test_get_index function fails. It can't access the current_user
object. It tries to check the authentication, which I have set up in the
ApplicationController and it says nil.check_authentication is failing,
and it should be current_user.check_authentication.
Anyone know how to get current_user to work within functional tests?