PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/view/formsdate/$yearMonthHourMinuteSecondSelectTagContent.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 32 lines | 25 code | 7 blank | 0 comment | 0 complexity | e774dcc82c4761af23df5cbd5350e2f3 MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cfset pkg.controller = controller("dummy")>
 4
 5	<cffunction name="setup">
 6		<cfset result = "">
 7		<cfset results = {}>
 8	</cffunction>
 9
10	<cffunction name="testBasic">
11		<cfset result = pkg.controller.$yearMonthHourMinuteSecondSelectTagContent(counter=5, value="", $optionNames="", $type="")>
12		<cfset assert("result IS '<option value=""5"">5</option>'")>
13	</cffunction>
14
15	<cffunction name="testSelected">
16		<cfset result = pkg.controller.$yearMonthHourMinuteSecondSelectTagContent(counter=3, value=3, $optionNames="", $type="")>
17		<cfset assert("result IS '<option selected=""selected"" value=""3"">3</option>'")>
18	</cffunction>
19
20	<cffunction name="testFormatting">
21		<cfset result = pkg.controller.$yearMonthHourMinuteSecondSelectTagContent(counter=1, value="", $optionNames="", $type="minute")>
22		<cfset assert("result IS '<option value=""1"">01</option>'")>
23		<cfset result = pkg.controller.$yearMonthHourMinuteSecondSelectTagContent(counter=59, value="", $optionNames="", $type="second")>
24		<cfset assert("result IS '<option value=""59"">59</option>'")>
25	</cffunction>
26
27	<cffunction name="testOptionName">
28		<cfset result = pkg.controller.$yearMonthHourMinuteSecondSelectTagContent(counter=1, value="", $optionNames="someName", $type="")>
29		<cfset assert("result IS '<option value=""1"">someName</option>'")>
30	</cffunction>
31
32</cfcomponent>