PageRenderTime 40ms CodeModel.GetById 16ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0, CPL-1.0
  1. <cfcomponent extends="wheelsMapping.Test">
  2. <cffunction name="setup">
  3. <cfset loc.authorModel = model("author")>
  4. </cffunction>
  5. <cffunction name="test_set_group_once">
  6. <cfset loc.group = "id, firstName">
  7. <cfset loc.authorModel.group(loc.group)>
  8. <cfset assert('loc.authorModel.toQuery().group eq $listClean(loc.group)')>
  9. </cffunction>
  10. <cffunction name="test_set_group_multiple_times">
  11. <cfset loc.group1 = "id, firstName">
  12. <Cfset loc.group2 = "lastName">
  13. <cfset loc.authorModel.group(loc.group1).group(loc.group2)>
  14. <cfset assert('loc.authorModel.toQuery().group eq $listClean(ListAppend(loc.group1, loc.group2))')>
  15. </cffunction>
  16. </cfcomponent>