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

/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
 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.profile = loc.author.newProfile() />
10		<cfset assert('IsObject(loc.profile) eq true')>
11		<cfset assert('loc.profile.authorid eq loc.author.id')>
12	</cffunction>
13
14</cfcomponent>