/wheels/tests/cache/Remove.cfc

http://cfwheels.googlecode.com/ · ColdFusion CFScript · 17 lines · 13 code · 4 blank · 0 comment · 0 complexity · 8340642a9ed8069a074d635d12b003c2 MD5 · raw file

  1. <cfcomponent extends="wheelsMapping.Test">
  2. <cfset cache = CreateObject("component", "wheels.Cache").init()>
  3. <cffunction name="setup">
  4. <cfset StructDelete(variables, "result")>
  5. <cfset StructDelete(variables, "results")>
  6. </cffunction>
  7. <cffunction name="testOneValue">
  8. <cfset cache.add(key="1", value="a")>
  9. <cfset cache.remove(key="1")>
  10. <cfset result = cache.get(key="1")>
  11. <cfset assert("IsBoolean(result) AND NOT result")>
  12. </cffunction>
  13. </cfcomponent>