/wheels/tests/controller/miscellaneous/$callaction.cfc
ColdFusion CFScript | 26 lines | 19 code | 7 blank | 0 comment | 0 complexity | 582efbb9ecb6e8a6e09c8bff24c7094d MD5 | raw file
Possible License(s): Apache-2.0, CPL-1.0
1<cfcomponent extends="wheelsMapping.Test"> 2 3 <cfset params = {controller="test", action="test"}> 4 <cfset loc.controller = controller("test", params)> 5 6 <cffunction name="setup"> 7 <cfset oldViewPath = application.wheels.viewPath> 8 <cfset application.wheels.viewPath = "wheels/tests/_assets/views"> 9 </cffunction> 10 11 <cffunction name="teardown"> 12 <cfset application.wheels.viewPath = oldViewPath> 13 </cffunction> 14 15 <cffunction name="test_setting_variable_for_view"> 16 <cfset loc.controller.$callAction(action="test")> 17 <cfset assert("loc.controller.response() Contains 'variableForViewContent'")> 18 </cffunction> 19 20 <cffunction name="test_implicitly_calling_render_page"> 21 <cfset loc.controller.$callAction(action="test")> 22 <cfset assert("loc.controller.response() Contains 'view template content'")> 23 </cffunction> 24 25 26</cfcomponent>