Skip to content

Commit c3e6b2b

Browse files
committed
test(files): drop unit cases the bulk-delete integration suite proves
1 parent b86cbf8 commit c3e6b2b

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

‎apps/sim/lib/workspace-files/application/archive-workspace-file-items.test.ts‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -169,24 +169,6 @@ describe('archiveWorkspaceFileItemsOperation', () => {
169169
input: { workspaceId: 'ws-1', fileIds, acceptVfsPath },
170170
})
171171

172-
it('archives the file each path names, once even when its id is also listed', async () => {
173-
await deleteByReference(['files/Docs/a.csv', 'file-a', 'file-b'])
174-
expect(mockArchive).toHaveBeenCalledWith(
175-
expect.objectContaining({ fileIds: ['file-a', 'file-b'] })
176-
)
177-
})
178-
179-
it('archives nothing when one path names no live file, and says which', async () => {
180-
await expect(deleteByReference(['files/Docs/a.csv', 'files/Docs/gone.csv'])).rejects.toThrow(
181-
'No live file at "files/Docs/gone.csv"'
182-
)
183-
await expect(deleteByReference(['files/Docs/a.csv,files/Docs/b.csv'])).rejects.toThrow(
184-
'pass each path as its own entry'
185-
)
186-
expect(mockAssertItems).not.toHaveBeenCalled()
187-
expect(mockArchive).not.toHaveBeenCalled()
188-
})
189-
190172
it('looks up no path for a caller it refuses', async () => {
191173
mockResolvePermission.mockImplementation(async () => {
192174
events.push('authorize')
@@ -198,14 +180,6 @@ describe('archiveWorkspaceFileItemsOperation', () => {
198180
expect(events).toEqual(['resolve', 'authorize'])
199181
})
200182

201-
it('leaves a path an unknown id for a caller that did not opt in', async () => {
202-
await deleteByReference(['files/Docs/a.csv'], false)
203-
expect(mockResolveReference).not.toHaveBeenCalled()
204-
expect(mockAssertItems).toHaveBeenCalledWith(
205-
expect.objectContaining({ fileIds: ['files/Docs/a.csv'] })
206-
)
207-
})
208-
209183
it('refuses more paths than one request resolves before looking any up', async () => {
210184
await expect(
211185
deleteByReference(Array.from({ length: 101 }, (_, index) => `files/f-${index}.csv`))

0 commit comments

Comments
 (0)