PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/wheels/tests/view/formsdateplain/HourSelectTag.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | 9923ba7b6e0213caf7727711d802f5ca 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_hourSelect_twelve_hour_format">
 8		<cfset loc.args.name = "dateselector">
 9		<cfset loc.args.twelveHour = "true">
10		<cfset loc.args.selected = "11">
11		<cfset loc.r = loc.controller.hourSelectTag(argumentcollection=loc.args)>
12		<cfset loc.e = '<select id="dateselector-hour" name="dateselector($hour)"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option selected="selected" value="11">11</option><option value="12">12</option></select>:<select id="dateselector-ampm" name="dateselector($ampm)"><option selected="selected" value="AM">AM</option><option value="PM">PM</option></select>'>
13		<cfset assert('loc.e eq loc.r')>
14		<cfset loc.args.selected = "23">
15		<cfset loc.r = loc.controller.hourSelectTag(argumentcollection=loc.args)>
16		<cfset loc.e = '<select id="dateselector-hour" name="dateselector($hour)"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option><option selected="selected" value="11">11</option><option value="12">12</option></select>:<select id="dateselector-ampm" name="dateselector($ampm)"><option value="AM">AM</option><option selected="selected" value="PM">PM</option></select>'>
17		<cfset assert('loc.e eq loc.r')>
18	</cffunction>
19
20</cfcomponent>