PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 0ms RepoModel.GetById 40ms app.codeStats 0ms

/wheels/tests/model/_query/group.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 20 lines | 16 code | 4 blank | 0 comment | 0 complexity | 7b4061ed82019c98a7e6ce69a11172ff 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_group_once">
 8		<cfset loc.group = "id, firstName">
 9		<cfset loc.authorModel.group(loc.group)>
10		<cfset assert('loc.authorModel.toQuery().group eq $listClean(loc.group)')>
11	</cffunction>
12
13	<cffunction name="test_set_group_multiple_times">
14		<cfset loc.group1 = "id, firstName">
15		<Cfset loc.group2 = "lastName">
16		<cfset loc.authorModel.group(loc.group1).group(loc.group2)>
17		<cfset assert('loc.authorModel.toQuery().group eq $listClean(ListAppend(loc.group1, loc.group2))')>
18	</cffunction>
19
20</cfcomponent>