PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/wheels/tests/model/onmissingmethod/hasone/removeobject.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 19 lines | 16 code | 3 blank | 0 comment | 0 complexity | 4f2bc3672d8939998128b7843e54e3cf 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_removeObject_valid">
 8		<cfset loc.author = loc.authorModel.findOne(where="firstName = 'Per'")>
 9		<cfset loc.profile = loc.author.profile()>
10		<cftransaction action="begin">
11			<cfset loc.updated = loc.author.removeProfile() />
12			<cfset loc.profile.reload() />
13			<cfset assert('loc.updated eq true')>
14			<cfset assert('loc.profile.authorid eq ""')>
15			<cftransaction action="rollback" />
16		</cftransaction>
17	</cffunction>
18
19</cfcomponent>