PageRenderTime 252ms CodeModel.GetById 130ms app.highlight 1ms RepoModel.GetById 120ms app.codeStats 0ms

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

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