refactored resource type and type mapping

This commit is contained in:
lotte
2019-06-24 16:29:54 +02:00
parent b846384ba7
commit f980b55c1c
101 changed files with 440 additions and 427 deletions

View File

@@ -10,13 +10,13 @@ import {
RemoveFromObjectCacheAction
} from './object-cache.actions';
import { CoreState } from '../core.reducers';
import { ResourceType } from '../shared/resource-type';
import { NormalizedItem } from './models/normalized-item.model';
import { first } from 'rxjs/operators';
import { Operation } from 'fast-json-patch';
import { RestRequestMethod } from '../data/rest-request-method';
import { AddToSSBAction } from './server-sync-buffer.actions';
import { Patch } from './object-cache.reducer';
import { Item } from '../shared/item.model';
describe('ObjectCacheService', () => {
let service: ObjectCacheService;
@@ -28,7 +28,7 @@ describe('ObjectCacheService', () => {
const msToLive = 900000;
let objectToCache = {
self: selfLink,
type: ResourceType.Item
type: Item.type
};
let cacheEntry;
let invalidCacheEntry;
@@ -37,7 +37,7 @@ describe('ObjectCacheService', () => {
function init() {
objectToCache = {
self: selfLink,
type: ResourceType.Item
type: Item.type
};
cacheEntry = {
data: objectToCache,