Skip to content
Snippets Groups Projects
Commit a434b570 authored by Samuel's avatar Samuel
Browse files

taskid 66074 Keep virtual metadata on relationship delete - fix lint issues

parent 038483c8
Branches
Tags
No related merge requests found
......@@ -11,9 +11,9 @@ import { Item } from '../../../../core/shared/item.model';
import { PaginatedList } from '../../../../core/data/paginated-list';
import { PageInfo } from '../../../../core/shared/page-info.model';
import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions';
import {NgbModal} from "@ng-bootstrap/ng-bootstrap";
import {Store} from "@ngrx/store";
import {CoreState} from "../../../../core/core.reducers";
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
import {Store} from '@ngrx/store';
import {CoreState} from '../../../../core/core.reducers';
let objectUpdatesService;
const url = 'http://test-url.com/test-url';
......
......@@ -9,7 +9,7 @@ import {
SetEditableFieldUpdateAction, SetValidFieldUpdateAction
} from './object-updates.actions';
import { OBJECT_UPDATES_TRASH_PATH, objectUpdatesReducer } from './object-updates.reducer';
import {Relationship} from "../../shared/item-relationships/relationship.model";
import {Relationship} from '../../shared/item-relationships/relationship.model';
class NullAction extends RemoveFieldUpdateAction {
type = null;
......@@ -45,7 +45,7 @@ const identifiable3 = {
language: null,
value: 'Unchanged value'
};
const relationship: Relationship = Object.assign(new Relationship, {uuid: 'test relationship uuid'});
const relationship: Relationship = Object.assign(new Relationship(), {uuid: 'test relationship uuid'});
const modDate = new Date(2010, 2, 11);
const uuid = identifiable1.uuid;
......
......@@ -11,7 +11,7 @@ import { of as observableOf } from 'rxjs';
import { Notification } from '../../../shared/notifications/models/notification.model';
import { NotificationType } from '../../../shared/notifications/models/notification-type';
import { OBJECT_UPDATES_TRASH_PATH } from './object-updates.reducer';
import {Relationship} from "../../shared/item-relationships/relationship.model";
import {Relationship} from '../../shared/item-relationships/relationship.model';
describe('ObjectUpdatesService', () => {
let service: ObjectUpdatesService;
......@@ -23,7 +23,7 @@ describe('ObjectUpdatesService', () => {
const identifiable2 = { uuid: '26cbb5ce-5786-4e57-a394-b9fcf8eaf241' };
const identifiable3 = { uuid: 'c5d2c2f7-d757-48bf-84cc-8c9229c8407e' };
const identifiables = [identifiable1, identifiable2];
const relationship: Relationship = Object.assign(new Relationship, {uuid: 'test relationship uuid'});
const relationship: Relationship = Object.assign(new Relationship(), {uuid: 'test relationship uuid'});
const fieldUpdates = {
[identifiable1.uuid]: { field: identifiable1Updated, changeType: FieldChangeType.UPDATE },
......@@ -44,7 +44,7 @@ describe('ObjectUpdatesService', () => {
};
store = new Store<CoreState>(undefined, undefined, undefined);
spyOn(store, 'dispatch');
service = new ObjectUpdatesService(store);
service = (new ObjectUpdatesService(store));
spyOn(service as any, 'getObjectEntry').and.returnValue(observableOf(objectEntry));
spyOn(service as any, 'getFieldState').and.callFake((uuid) => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment