Reputation: 2729
inside test file I want to check results after action
ctrl.send('createLoanApplication').then(function(){
console.log('test');
});
this is action
createLoanApplication: function () {
var value = this.get('selectedCompany');
if (value) {
var controller = this;
return $.post('/api/loanapplication/create/' + value).done(function (data) {
controller.transitionToRoute('loan-details', data.id);
});
}
}
Upvotes: 1
Views: 847
Reputation:
send
does not return a value. Therefore you cannot take a then
of its result.
Upvotes: 2