mirror of
https://github.com/nasa/openmct.git
synced 2025-03-11 15:04:10 +00:00
[Persistence] Don't evict models on persist
https://github.com/nasa/openmct/issues/745#issuecomment-204559209
This commit is contained in:
parent
5b98da6681
commit
da09ffd3fa
@ -149,9 +149,6 @@ define(
|
|||||||
getKey(domainObject.getId()),
|
getKey(domainObject.getId()),
|
||||||
domainObject.getModel()
|
domainObject.getModel()
|
||||||
]).then(function(result){
|
]).then(function(result){
|
||||||
if (result) {
|
|
||||||
cacheService.remove(domainObject.getId());
|
|
||||||
}
|
|
||||||
return rejectIfFalsey(result, self.$q);
|
return rejectIfFalsey(result, self.$q);
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
return notifyOnError(error, domainObject, self.notificationService, self.$q);
|
return notifyOnError(error, domainObject, self.notificationService, self.$q);
|
||||||
|
@ -176,12 +176,8 @@ define(
|
|||||||
expect(mockQ.reject).not.toHaveBeenCalled();
|
expect(mockQ.reject).not.toHaveBeenCalled();
|
||||||
expect(mockNofificationService.error).not.toHaveBeenCalled();
|
expect(mockNofificationService.error).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("removes the model from the cache", function () {
|
|
||||||
persistence.persist();
|
|
||||||
expect(mockCacheService.remove).toHaveBeenCalledWith(id);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
describe("unsuccessful persistence", function() {
|
describe("unsuccessful persistence", function() {
|
||||||
var sadPromise = {
|
var sadPromise = {
|
||||||
then: function(callback){
|
then: function(callback){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user