ColdBox Framework Forums Notification: Post to Unit testing coldboxproxy event handlers that return a value

Title: Unit testing coldboxproxy event handlers that return a value
Thread: Unit testing coldboxproxy event handlers that return a value
Forum: Need Help?
Conference: ColdBox
User: prentice I am writing a unit test for an event that will be called via the coldboxproxy
using flash remoting, and I am wondering how I can get the return value from the
event. For example, in a regular non-coldboxproxy event, it looks something
like this:

[code]
  <cffunction name="login" access="public" returntype="any"
output="false">
    <cfargument name="Event"
type="coldbox.system.beans.requestContext" />

    <cfset
getPlugin("ioc").getBean("UserService").validateLogin(Event.getValue("user"),
Event.getValue("pass")) />
    <cfset Event.setView("login/successful") />
</cffunction>
[/code]

However, on the coldboxproxy version of the event, I
would remove tthe setView() and do a cfreturn instead, like this:

[code]
<cffunction name="login" access="public" returntype="any" output="false">
<cfargument name="Event" type="coldbox.system.beans.requestContext" />
<cfset
getPlugin("ioc").getBean("UserService").validateLogin(Event.getValue("user"),
Event.getValue("pass")) />
    <cfreturn true />
  </cffunction>
[/code]

My
typical unit test that looks like:

[code]
event =
execute("authentication.login");
[/code]

The event that gets returned is the
request context, not the value I was returning. How do I get the value I was
returning instead?
http://forums.coldboxframework.com/index.cfm?event=ehMessages.dspMessages&threadid=0FA753CB-FF6E-E829-9A9D875C60D13600