/wheels/tests/model/onmissingmethod/hasone/newobject.cfc
http://cfwheels.googlecode.com/ · ColdFusion CFScript · 14 lines · 11 code · 3 blank · 0 comment · 0 complexity · 5efc40bb2b30e203aeb197daf4dbfd9f MD5 · raw file
- <cfcomponent extends="wheelsMapping.Test">
-
- <cffunction name="setup">
- <cfset loc.authorModel = model("author")>
- </cffunction>
-
- <cffunction name="test_newObject_valid">
- <cfset loc.author = loc.authorModel.findOne(where="firstName = 'James'")>
- <cfset loc.profile = loc.author.newProfile() />
- <cfset assert('IsObject(loc.profile) eq true')>
- <cfset assert('loc.profile.authorid eq loc.author.id')>
- </cffunction>
-
- </cfcomponent>