/wheels/tests/_assets/controllers/Verifies.cfc

http://cfwheels.googlecode.com/ · ColdFusion CFScript · 36 lines · 28 code · 8 blank · 0 comment · 0 complexity · 708f49cbe600d88ca433f765ed3b2615 MD5 · raw file

  1. <cfcomponent extends="Controller">
  2. <cffunction name="init">
  3. <cfset verifies(only="actionGet", get="true")>
  4. <cfset verifies(only="actionPost", post="true")>
  5. <cfset verifies(only="actionPostWithRedirect", post="true", action="index", controller="somewhere", error="invalid")>
  6. <cfset verifies(only="actionPostWithTypesValid", post="true", params="userid,authorid", paramsTypes="integer,guid")>
  7. <cfset verifies(only="actionPostWithTypesInValid", post="true", params="userid,authorid", paramsTypes="integer,guid")>
  8. <cfset verifies(only="actionPostWithString", post="true", params="username,password", paramsTypes="string,blank")>
  9. </cffunction>
  10. <cffunction name="actionGet">
  11. <cfset renderText("actionGet")>
  12. </cffunction>
  13. <cffunction name="actionPost">
  14. <cfset renderText("actionPost")>
  15. </cffunction>
  16. <cffunction name="actionPostWithRedirect">
  17. <cfset renderText("actionPostWithRedirect")>
  18. </cffunction>
  19. <cffunction name="actionPostWithTypesValid">
  20. <cfset renderText("actionPostWithTypesValid")>
  21. </cffunction>
  22. <cffunction name="actionPostWithTypesInValid">
  23. <cfset renderText("actionPostWithTypesInValid")>
  24. </cffunction>
  25. <cffunction name="actionPostWithString">
  26. <cfset renderText("actionPostWithString")>
  27. </cffunction>
  28. </cfcomponent>