PageRenderTime 62ms CodeModel.GetById 31ms app.highlight 0ms RepoModel.GetById 20ms app.codeStats 0ms

/wheels/tests/view/forms/radioButtonTag.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | 0d4ca9d88ca502788c40de525f07649a MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.controller = controller(name="dummy")>
 5	</cffunction>
 6
 7	<cffunction name="test_radioButtonTag_value_not_blank">
 8		<cfset loc.e = loc.controller.radioButtonTag(name="gender", value="m", label="Male", checked=true)>
 9		<cfset loc.r = '<label for="gender-m">Male<input checked="checked" id="gender-m" name="gender" type="radio" value="m" /></label>'>
10		<cfset debug(expression='loc.e', display=false, format="text")>
11		<cfset assert('loc.e eq loc.r')>
12	</cffunction>
13
14	<cffunction name="test_radioButtonTag_value_blank">
15		<cfset loc.e = loc.controller.radioButtonTag(name="gender", value="", label="Male", checked=true)>
16		<cfset loc.r = '<label for="gender">Male<input checked="checked" id="gender" name="gender" type="radio" value="" /></label>'>
17		<cfset debug(expression='htmleditformat(loc.e)', display=false, format="text")>
18		<cfset assert('loc.e eq loc.r')>
19	</cffunction>
20
21</cfcomponent>