I have the following function written in an Ember route
delete(line) {
line.destroyRecord().then(() => {
this.store.unloadRecord(line);
this.controller.get('deliveryLines').removeObject(line);
});
},
My question is, should I write unit tests to cover it ?
After all, the function does not return anything, and does not have any side effects. Should I write unit tests to cover that the function is calling e.g. destroyRecord
or unloadRecord
?
Aucun commentaire:
Enregistrer un commentaire