In a certain scenario, I am initializing some variables in the controller's $onInit method. How can I verify that these properties are being set correctly?
Controller
ctrl.$onInit = function () {
ctrl.devices = _.cloneDeep(ctrl.formDevices);
};
Unit test
it('should ensure that device related properties are accessible in the view', function () {
expect(controller.devices).toBeDefined();
};
Output