test-utils: make optional actor object

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2025-04-09 16:04:04 +02:00
parent ebe9b13b0a
commit dea4fb1708
2 changed files with 6 additions and 6 deletions
@@ -596,7 +596,7 @@ describe('createRouter', () => {
expect(mockApplyConditions).toHaveBeenCalledWith(
'plugin-1',
mockCredentials.user('user:default/spiderman', {
actor: 'some-service',
actor: { subject: 'some-service' },
}),
[
expect.objectContaining({
@@ -611,7 +611,7 @@ describe('createRouter', () => {
expect(mockApplyConditions).toHaveBeenCalledWith(
'plugin-2',
mockCredentials.user('user:default/spiderman', {
actor: 'some-service',
actor: { subject: 'some-service' },
}),
[
expect.objectContaining({
@@ -729,7 +729,7 @@ describe('createRouter', () => {
function userTokenIssuedByService() {
return mockCredentials.user.token('user:default/spiderman', {
actor: 'some-service',
actor: { subject: 'some-service' },
});
}
});