PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/model/_query/include.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 20 lines | 16 code | 4 blank | 0 comment | 0 complexity | 1d3860d06aa3462a793b89f890ad2274 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.authorModel = model("author")>
 5	</cffunction>
 6
 7	<cffunction name="test_set_include_once">
 8		<cfset loc.include = "posts">
 9		<cfset loc.authorModel.include(loc.include)>
10		<cfset assert('loc.authorModel.toQuery().include eq $listClean(loc.include)')>
11	</cffunction>
12
13	<cffunction name="test_set_include_multiple_times">
14		<cfset loc.include1 = "posts">
15		<Cfset loc.include2 = "profile">
16		<cfset loc.authorModel.include(loc.include1).include(loc.include2)>
17		<cfset assert('loc.authorModel.toQuery().include eq $listClean(ListAppend(loc.include1, loc.include2))')>
18	</cffunction>
19
20</cfcomponent>