Skip to content

Commit 9a66fee

Browse files
authored
fix(tests): derive document grant expiry from one timestamp (#9325)
1 parent 972b92e commit 9a66fee

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/sim/lib/projects/files/__integration__/documents.integration.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ async function fixture(permissionType: 'read' | 'write' = 'write') {
137137
},
138138
})
139139
const target = { projectId: ids.projectId, fileId: created.file.id }
140+
const issuedAt = new Date()
140141
const principal: ResourceDelegatedPrincipal = {
141142
kind: 'resource_delegated',
142143
serviceId: 'realtime',
143144
subjectUserId: editorId,
144145
audience: 'sim:project-files',
145146
delegationId: generateId(),
146-
issuedAt: new Date(),
147-
expiresAt: new Date(Date.now() + 60_000),
147+
issuedAt,
148+
expiresAt: new Date(issuedAt.getTime() + 60_000),
148149
scope: {
149150
kind: 'entity',
150151
entityType: 'project',

0 commit comments

Comments
 (0)