PageRenderTime 21ms CodeModel.GetById 19ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/controller/provides/initialization.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 18 lines | 14 code | 4 blank | 0 comment | 0 complexity | 3e69a280b045f2a3cd1d0ee088119cc5 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfset params = {controller="dummy", action="dummy"}>
 4	<cfset loc.controller = controller("dummy", params)>
 5
 6	<cffunction name="test_provides_sets_controller_class_data">
 7		<cfset formats = "json,xml,csv">
 8		<cfset loc.controller.provides(formats=formats) />
 9		<cfset assert('loc.controller.$getControllerClassData().formats.default eq "html,#formats#"')>
10	</cffunction>
11
12	<cffunction name="test_onlyProvides_sets_controller_class_data">
13		<cfset formats = "html">
14		<cfset loc.controller.onlyProvides(formats="html") />
15		<cfset assert('loc.controller.$getControllerClassData().formats.actions.dummy eq formats')>
16	</cffunction>
17
18</cfcomponent>