group-mock.ts (dspace-angular-dspace-7.0) | : | group-mock.ts (dspace-angular-dspace-7.1) | ||
---|---|---|---|---|
import { Group } from '../../core/eperson/models/group.model'; | import { Group } from '../../core/eperson/models/group.model'; | |||
import { EPersonMock } from './eperson.mock'; | import { EPersonMock } from './eperson.mock'; | |||
import { of } from 'rxjs'; | ||||
import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils'; | ||||
export const GroupMock2: Group = Object.assign(new Group(), { | export const GroupMock2: Group = Object.assign(new Group(), { | |||
handle: null, | handle: null, | |||
subgroups: [], | subgroups: [], | |||
epersons: [], | epersons: [], | |||
permanent: true, | permanent: true, | |||
selfRegistered: false, | selfRegistered: false, | |||
_links: { | _links: { | |||
self: { | self: { | |||
href: 'https://dspace.4science.it/dspace-spring-rest/api/eperson/gro ups/testgroupid2', | href: 'https://rest.api/server/api/eperson/groups/testgroupid2', | |||
}, | }, | |||
subgroups: { href: 'https://dspace.4science.it/dspace-spring-rest/api/ep | subgroups: { href: 'https://rest.api/server/api/eperson/groups/testgroup | |||
erson/groups/testgroupid2/subgroups' }, | id2/subgroups' }, | |||
object: { href: 'https://dspace.4science.it/dspace-spring-rest/api/epers | object: { href: 'https://rest.api/server/api/eperson/groups/testgroupid2 | |||
on/groups/testgroupid2/object' }, | /object' }, | |||
epersons: { href: 'https://dspace.4science.it/dspace-spring-rest/api/epe | epersons: { href: 'https://rest.api/server/api/eperson/groups/testgroupi | |||
rson/groups/testgroupid2/epersons' } | d2/epersons' } | |||
}, | }, | |||
_name: 'testgroupname2', | _name: 'testgroupname2', | |||
id: 'testgroupid2', | id: 'testgroupid2', | |||
uuid: 'testgroupid2', | uuid: 'testgroupid2', | |||
type: 'group', | type: 'group', | |||
object: createSuccessfulRemoteDataObject$({ name: 'testgroupid2objectName'}) | ||||
}); | }); | |||
export const GroupMock: Group = Object.assign(new Group(), { | export const GroupMock: Group = Object.assign(new Group(), { | |||
handle: null, | handle: null, | |||
subgroups: [GroupMock2], | subgroups: [GroupMock2], | |||
epersons: [EPersonMock], | epersons: [EPersonMock], | |||
selfRegistered: false, | selfRegistered: false, | |||
permanent: false, | permanent: false, | |||
_links: { | _links: { | |||
self: { | self: { | |||
href: 'https://dspace.4science.it/dspace-spring-rest/api/eperson/gro ups/testgroupid', | href: 'https://rest.api/server/api/eperson/groups/testgroupid', | |||
}, | }, | |||
subgroups: { href: 'https://dspace.4science.it/dspace-spring-rest/api/ep | subgroups: { href: 'https://rest.api/server/api/eperson/groups/testgroup | |||
erson/groups/testgroupid/subgroups' }, | id/subgroups' }, | |||
object: { href: 'https://dspace.4science.it/dspace-spring-rest/api/epers | object: { href: 'https://rest.api/server/api/eperson/groups/testgroupid2 | |||
on/groups/testgroupid2/object' }, | /object' }, | |||
epersons: { href: 'https://dspace.4science.it/dspace-spring-rest/api/epe | epersons: { href: 'https://rest.api/server/api/eperson/groups/testgroupi | |||
rson/groups/testgroupid/epersons' } | d/epersons' } | |||
}, | }, | |||
_name: 'testgroupname', | _name: 'testgroupname', | |||
id: 'testgroupid', | id: 'testgroupid', | |||
uuid: 'testgroupid', | uuid: 'testgroupid', | |||
type: 'group', | type: 'group', | |||
}); | }); | |||
End of changes. 6 change blocks. | ||||
14 lines changed or deleted | 17 lines changed or added |