PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/controller/request/isajax.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 15 lines | 11 code | 4 blank | 0 comment | 0 complexity | e1bc2cd36277eab7bd6e7e2823a4dea8 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfinclude template="common.cfm">
 4
 5	<cffunction name="test_isAjax_valid">
 6		<cfset request.cgi.http_x_requested_with = "XMLHTTPRequest">
 7		<cfset assert("loc.controller.isAjax() eq true")>
 8	</cffunction>
 9
10	<cffunction name="test_isAjax_invalid">
11		<cfset request.cgi.http_x_requested_with = "">
12		<cfset assert("loc.controller.isAjax() eq false")>
13	</cffunction>
14
15</cfcomponent>