PageRenderTime 22ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.authorModel = model("author")>
 5	</cffunction>
 6 
 7 	<cffunction name="test_newObject_valid">
 8		<cfset loc.author = loc.authorModel.findOne(where="firstName = 'James'")>
 9		<cfset loc.post = loc.author.newPost() />
10		<cfset assert('IsObject(loc.post) eq true')>
11		<cfset assert('loc.post.authorid eq loc.author.id')>
12	</cffunction>
13
14</cfcomponent>