Before upgrading to wireBox I actually had no problem with these tests, but now I get a variable not found.
First I have all my tests in a directory called unitTests, all other tests work except any that use the Execute(event). The unit tests directory is not in the webroot, and has all the correct mappings etc.
The problem that I see it as is that the mappings or bindings so to speak are getting confused, that’s the only way that I can describe this.
So if I have something like the following in my tests.
var event = execute(‘module:Comment.index’);
var result = event.getRenderData();
assertEquals(‘ok’, result.data.status, ‘Was not able to create a comment.’ );
The event is fired and is run, but anything that should be DI’ed into the handler is not.
So the question is how should this work? Or more importantly do I need to do something special on the tests side for WireBox to do its magic?
The unitTests directory has an application.cfc that has a different name to the main application, and the remoteFacade also resides in this directory, if that helps and all the settings are correct for all other tests to work, just not in this scenario.
Regards,
Andrew Scott