Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot send actions to Routes #172

Closed
thec0keman opened this issue Jun 3, 2015 · 2 comments
Closed

Cannot send actions to Routes #172

thec0keman opened this issue Jun 3, 2015 · 2 comments

Comments

@thec0keman
Copy link

With a simple Route test:

moduleFor('route:application', 'Application', {
  beforeEach: function () {},
  afterEach: function () {}
});

test('It can receive an action', function(assert) {
  var subject = this.subject();
  subject.send('doSomething');
});

It fails with:

TypeError: Cannot read property 'trigger' of undefined

This is the send action on the router itself, which it appears it is because this.router is null on that object.
ember-qunit: 0.4.0
ember: 1.13.0-beta.2

This was working with Ember 1.12, so I'm assuming this is an API change on that end. The simple solution is to stub out router on the route instance and everything works as expected. Perhaps there is a fix here, or maybe it would be better to have a moduleForRoute that does some extra setup?

(Sorry if this isn't the correct repo to post to).

@thec0keman
Copy link
Author

Or is this related to #11150?

@thec0keman
Copy link
Author

Should be resolved by #11664

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant