Update audit owner resolution tests to include 'system' property for marketplace and user actors
Some checks failed
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
Some checks failed
farmcontrol/farmcontrol-api/pipeline/head There was a failure building this commit
This commit is contained in:
parent
d86dbe0261
commit
624a2aefdd
@ -131,12 +131,17 @@ describe('marketplace sync upserts', () => {
|
|||||||
describe('audit owner resolution', () => {
|
describe('audit owner resolution', () => {
|
||||||
it('uses marketplace ownerType for marketplace actors', () => {
|
it('uses marketplace ownerType for marketplace actors', () => {
|
||||||
expect(resolveAuditOwner({ _id: 'm1', _objectType: 'marketplace' })).toEqual({
|
expect(resolveAuditOwner({ _id: 'm1', _objectType: 'marketplace' })).toEqual({
|
||||||
|
system: false,
|
||||||
owner: 'm1',
|
owner: 'm1',
|
||||||
ownerType: 'marketplace',
|
ownerType: 'marketplace',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('defaults to user', () => {
|
it('defaults to user', () => {
|
||||||
expect(resolveAuditOwner({ _id: 'u1' })).toEqual({ owner: 'u1', ownerType: 'user' });
|
expect(resolveAuditOwner({ _id: 'u1' })).toEqual({
|
||||||
|
system: false,
|
||||||
|
owner: 'u1',
|
||||||
|
ownerType: 'user',
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user