PageRenderTime 24ms CodeModel.GetById 1ms RepoModel.GetById 0ms 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
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_include_once">
  6. <cfset loc.include = "posts">
  7. <cfset loc.authorModel.include(loc.include)>
  8. <cfset assert('loc.authorModel.toQuery().include eq $listClean(loc.include)')>
  9. </cffunction>
  10. <cffunction name="test_set_include_multiple_times">
  11. <cfset loc.include1 = "posts">
  12. <Cfset loc.include2 = "profile">
  13. <cfset loc.authorModel.include(loc.include1).include(loc.include2)>
  14. <cfset assert('loc.authorModel.toQuery().include eq $listClean(ListAppend(loc.include1, loc.include2))')>
  15. </cffunction>
  16. </cfcomponent>