Basically I have a controller action that calls send, and that action should be handled in the route. I have a test for it which used to work, but after upgrading ember-mocha (which probably updated the test helpers), this doesn't work anymore. Here's a JSBin that reproduces the issue.
The issue seems to be that it's trying to look up a router somewhere which is set to undefined. I believe this is somewhere in EmberRouteror so, the compiled output of the function where the error is raised is:
send: function (name, context) {
var _router3;
(_router3 = this.router).trigger.apply(_router3, arguments);
},
edit:
Here is a version that works. It's the same, but uses different ember and ember-mocha versions.
Narrowing it down further, the problem definitely seems to have appeared between v. 0.7.0 and 0.8.0 of ember-mocha.
Work around for now (using latest version of ember-mocha): http://jsbin.com/fohomo/edit?html,js,output
We need a similar fix as what was done in https://github.com/emberjs/ember.js/pull/11664, but for controllers.
Is this fixed for controllers?
@Fryie @rwjblue is this still an issue, perhaps we should close or create a new reproduction of this, what do you think?
Per our triage policy I'll close this out for now, feel free to reopen if the issue persists on the current release.
Most helpful comment
Is this fixed for controllers?