/wheels/tests/model/onmissingmethod/hasone/deleteobject.cfc
ColdFusion CFScript | 18 lines | 15 code | 3 blank | 0 comment | 0 complexity | dfab267143e83f0b55600bbdcec374a4 MD5 | raw file
Possible License(s): Apache-2.0, CPL-1.0
- <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>