Angular unit testing with Jasmine: how to remove or modify spyOn

You can just overwrite it

updateService.getUpdate = jasmine.createSpy().and.returnValue(etc)

You can override the return value of the spy

    var deferred = $q.defer();
    deferred.resolve( data1 );

    var getUpdateSpy = spyOn(updateService, 'getUpdate').and.returnValue(deferred.promise);



    var newDeferred = $q.defer();
    newDeferred.resolve( data2 );

    getUpdateSpy.and.returnValue(newDeferred.promise);