Observers are tapped in every digest cycle. This usually happens automatically, but during unit testing you need to manually run it:
it('should update the start date', function() { // Arrange ProfileSharedObjectMock.startDate = new Date(2013, 0, 1); // Act $scope.$digest(); // Assert expect($scope.startDate).toEqual(new Date(2013, 0, 1)); });
I created a Plunker script so you can see the whole test suite.
source share