title: Ember: how to test a function involves setting variable for new route
body: <p>I have this code:</p>
  
  <pre><code>this.transitionToRoute('question').then(function(newRoute) {
      newRoute.controller.set('name',name__ );}
  </code></pre>
  
  <p>in an action func
  and I try to unit test it:</p>
  
  <p>This is what I have now :</p>
  
  <pre><code>let ctrl = this.subject();
  
  var calledTransitionToRoute = "";
  ctrl.transitionToRoute = function(route) {
  calledTransitionToRoute = route;
  };
  ctrl.send('routeToConfirm');
  return wait().then(function() {
  assert.equal(calledTransitionToRoute, 'question');
  });
  </code></pre>
  
  <p>I just dont know how to test if the new route receives the name variable.
  Can anyone help me?</p>