/wheels/tests/model/onmissingmethod/hasMany/newobject.cfc
http://cfwheels.googlecode.com/ · ColdFusion CFScript · 14 lines · 11 code · 3 blank · 0 comment · 0 complexity · c41cd0532eb68ec3b734117f80d6670c 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.post = loc.author.newPost() />
- <cfset assert('IsObject(loc.post) eq true')>
- <cfset assert('loc.post.authorid eq loc.author.id')>
- </cffunction>
-
- </cfcomponent>