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

/wheels/tests/view/errors/errorMessageOn.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | 3007a520c769a5943265e78ef75411cd MD5 | raw file
 1<cfcomponent extends="wheelsMapping.Test">
 2
 3	<cffunction name="setup">
 4		<cfset loc.controller = controller(name="ControllerWithModelErrors")>
 5		<cfset loc.args = {}>
 6		<cfset loc.args.objectName = "user">
 7		<cfset loc.args.class = "errors-found">
 8	</cffunction>
 9
10	<cffunction name="test_all_options_supplied">
11		<cfset loc.args.property = "firstname">
12		<cfset loc.args.prependText = "prepend ">
13		<cfset loc.args.appendText = " append">
14		<cfset loc.args.wrapperElement = "div">
15		<cfset loc.e = loc.controller.errorMessageOn(argumentcollection=loc.args)>
16		<cfset loc.r = '<div class="errors-found">prepend firstname error1 append</div>'>
17		<cfset assert("loc.e eq loc.r")>
18	</cffunction>
19
20</cfcomponent>