PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/view/forms/submitTag.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 20 lines | 16 code | 4 blank | 0 comment | 0 complexity | 6dc6d25ab9ac50219acbd7f640d47a7a MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.controller = controller(name="ControllerWithModel")>
 5	</cffunction>
 6
 7	<cffunction name="test_defaults">
 8		<cfset loc.e = loc.controller.submitTag()>
 9		<cfset loc.r = '<input type="submit" value="Save changes" />'>
10		<cfset debug('loc.e', false)>
11		<cfset assert('loc.e eq loc.r')>
12	</cffunction>
13
14	<cffunction name="test_disabled_is_escaped">
15		<cfset loc.e = loc.controller.submitTag(disable="Mark as: 'Completed'?")>
16		<cfset loc.r = '<input data-disable-with="Mark as: \''Completed\''?" type="submit" value="Save changes" />'>
17		<cfset assert('loc.e eq loc.r')>
18	</cffunction>
19
20</cfcomponent>