I'm trying pass an acceptance test that checks if user is redirected. When user type an URL, it should be redirected to another URL.Could someone tell me why I'm getting this error on the console?
ember.debug.js:30195 Error while processing route: account.contacts.index Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined
This is my route account/contacts/index.js
import Ember from 'ember';
export default Ember.Route.extend({
redirect: function () {
this.transitionTo('account.contacts.company');
}
});
And this is my account/contacts/index-test.js
moduleForAcceptance('Acceptance | /account/contacts/index');
test('visiting URL', function(assert) {
visit('/account/contacts');
andThen(function() {
assert.equal(currentURL(), '/account/contacts/company');
});
});
On my tests this is what I get:
Expected:"/account/contacts/company"
Result: "/account/contacts"
Aucun commentaire:
Enregistrer un commentaire