PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/controller/rendering/renderpartial.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 18 lines | 13 code | 5 blank | 0 comment | 0 complexity | bf4852b135b8cc069ba10d97762da02b MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfinclude template="setupAndTeardown.cfm">
 4
 5	<cfset params = {controller="test", action="test"}>	
 6	<cfset loc.controller = controller("test", params)>
 7
 8	<cffunction name="test_rendering_partial">
 9		<cfset result = loc.controller.renderPartial(partial="partialTemplate")>
10		<cfset assert("loc.controller.response() Contains 'partial template content'")>
11	</cffunction>
12
13	<cffunction name="test_rendering_partial_and_returning_as_string">
14		<cfset result = loc.controller.renderPartial(partial="partialTemplate", returnAs="string")>
15		<cfset assert("NOT StructKeyExists(request.wheels, 'response') AND result Contains 'partial template content'")>
16	</cffunction>
17
18</cfcomponent>