fix: complete image_make asset delivery
This commit is contained in:
@@ -42,7 +42,7 @@ test('image generation route passes authenticated user and idempotency key to th
|
||||
purpose: 'hero',
|
||||
prompt: 'calm library',
|
||||
negativePrompt: undefined,
|
||||
consumerRef: 'mindspace:req-1:hero',
|
||||
consumerRef: 'mindspace:imgreq-1:hero',
|
||||
idempotencyKey: 'imgreq-1',
|
||||
}]);
|
||||
} finally { await fixture.close(); }
|
||||
@@ -84,11 +84,15 @@ test('internal image generation route requires its injected secret guard and exp
|
||||
assert.equal(denied.status, 401);
|
||||
const allowed = await fetch(`${fixture.url}/agent/mindspace_image_generate`, {
|
||||
method: 'POST',
|
||||
headers: { 'content-type': 'application/json', authorization: 'Bearer internal-secret' },
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
authorization: 'Bearer internal-secret',
|
||||
'idempotency-key': 'page-hero-1',
|
||||
},
|
||||
body: JSON.stringify({ user_id: 'user-2', purpose: 'hero', prompt: 'x' }),
|
||||
});
|
||||
assert.equal(allowed.status, 201);
|
||||
assert.equal(calls[0].userId, 'user-2');
|
||||
assert.equal(calls[0].consumerRef, 'mindspace-agent:req-1:hero');
|
||||
assert.equal(calls[0].consumerRef, 'mindspace-agent:page-hero-1:hero');
|
||||
} finally { await fixture.close(); }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user