PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/wheels/tests/view/formsobject/TextField.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 29 lines | 22 code | 7 blank | 0 comment | 0 complexity | 68cb5011b40c222d5bc63bbdf335cdc8 MD5 | raw file
Possible License(s): Apache-2.0, CPL-1.0
  1. <cfcomponent extends="wheelsMapping.Test">
  2. <cfset pkg.controller = controller("controllerWithModelErrors")>
  3. <cffunction name="setup">
  4. <cfset result = "">
  5. </cffunction>
  6. <cffunction name="testDefaultErrorElement">
  7. <cfset result = pkg.controller.textField(objectName="user", property="firstName")>
  8. <cfset assert("result Contains 'span class=""fieldWithErrors""'")>
  9. </cffunction>
  10. <cffunction name="testCustomErrorElement">
  11. <cfset result = pkg.controller.textField(errorElement="div", objectName="user", property="firstName")>
  12. <cfset assert("result Contains 'div class=""fieldWithErrors""'")>
  13. </cffunction>
  14. <cffunction name="testDefaultClassOnError">
  15. <cfset result = pkg.controller.textField(objectName="user", property="firstName")>
  16. <cfset assert("result Contains 'span class=""fieldWithErrors""'")>
  17. </cffunction>
  18. <cffunction name="testCustomClassOnError">
  19. <cfset result = pkg.controller.textField(errorClass="customClass", objectName="user", property="firstName")>
  20. <cfset assert("result Contains 'span class=""customClass""'")>
  21. </cffunction>
  22. </cfcomponent>