Class: Authlogic::TestCase::MockAPIController
Overview
Basically acts like an API controller but doesn’t do anything. Authlogic can interact with this, do it’s thing and then you can look at the controller object to see if anything changed.
Constant Summary
ControllerAdapters::AbstractAdapter::ENV_SESSION_OPTIONS, ControllerAdapters::AbstractAdapter::E_COOKIE_DOMAIN_ADAPTER
Instance Attribute Summary collapse
#controller
Instance Method Summary
collapse
#authenticate_with_http_basic, #cookies, #last_request_update_allowed?, #renew_session_id, #respond_to_missing?, #responds_to_single_access_allowed?, #single_access_allowed?
Constructor Details
Returns a new instance of MockAPIController.
11
12
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 11
def initialize
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Authlogic::ControllerAdapters::AbstractAdapter
Instance Attribute Details
#request_content_type ⇒ Object
33
34
35
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 33
def request_content_type
@request_content_type ||= "text/html"
end
|
Instance Method Details
#cookie_domain ⇒ Object
17
18
19
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 17
def cookie_domain
nil
end
|
#logger ⇒ Object
21
22
23
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 21
def logger
@logger ||= MockLogger.new
end
|
#params ⇒ Object
25
26
27
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 25
def params
@params ||= {}
end
|
#request ⇒ Object
29
30
31
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 29
def request
@request ||= MockRequest.new(self)
end
|
#session ⇒ Object
37
38
39
|
# File 'lib/authlogic/test_case/mock_api_controller.rb', line 37
def session
@session ||= {}
end
|