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

/wheels/tests/model/_query/select.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 20 lines | 16 code | 4 blank | 0 comment | 0 complexity | 1f01b3b176fc59e475beb01b974740c1 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.profileModel = model("profile")>
 5	</cffunction>
 6
 7	<cffunction name="test_set_select_once">
 8		<cfset loc.select = "id, authorid, dateofbirth, bio">
 9		<cfset loc.profileModel.select(loc.select)>
10		<cfset assert('loc.profileModel.toQuery().select eq $listClean(loc.select)')>
11	</cffunction>
12
13	<cffunction name="test_set_select_multiple_times">
14		<cfset loc.select1 = "profiles.id, authorid">
15		<Cfset loc.select2 = "dateofbirth, bio">
16		<cfset loc.profileModel.select(loc.select1).select(loc.select2)>
17		<cfset assert('loc.profileModel.toQuery().select eq $listClean(ListAppend(loc.select1, loc.select2))')>
18	</cffunction>
19
20</cfcomponent>