/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
- <cfcomponent extends="wheelsMapping.Test">
-
- <cffunction name="setup">
- <cfset loc.authorModel = model("author")>
- </cffunction>
-
- <cffunction name="test_deleteObject_valid">
- <cfset loc.author = loc.authorModel.findOne(where="firstName = 'Per'")>
- <cftransaction action="begin">
- <cfset loc.updated = loc.author.deleteProfile() />
- <cfset loc.profile = loc.author.profile()>
- <cfset assert('loc.updated eq true')>
- <cfset assert('loc.profile eq false')>
- <cftransaction action="rollback" />
- </cftransaction>
- </cffunction>
-
- </cfcomponent>