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

/wheels/tests/controller/rendering/$argumentsForPartial.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | 1ca09b8bfe6065d99ca0143366c95e1b MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfinclude template="setupAndTeardown.cfm">
 4
 5	<cfset params = {controller="dummy", action="dummy"}>
 6	<cfset loc.controller = controller("dummy", params)>
 7	
 8	<cffunction name="$injectIntoVariablesScope" output="false">
 9		<cfargument name="name" type="string" required="true" />
10		<cfargument name="data" type="any" required="true" />
11		<cfset variables[arguments.name] = arguments.data />
12		<cfreturn />
13	</cffunction>
14
15	<cffunction name="test_name_is_not_a_function">
16		<cfset query = QueryNew("a,b,c,e") />
17		<cfset loc.controller.$injectIntoVariablesScope = this.$injectIntoVariablesScope />
18		<cfset loc.controller.$injectIntoVariablesScope(name="query", data=query) />
19		<cfset loc.e = loc.controller.$argumentsForPartial($name="query", $dataFunction=true)>
20		<cfset assert('IsStruct(loc.e) and StructIsEmpty(loc.e)') />
21	</cffunction>
22
23</cfcomponent>