release: PicHost v1.0.0
Publish Docker image / build-and-push (push) Canceled after 0s
ci / ci (22, ubuntu-latest) (push) Canceled after 0s
Publish Docker image / build-and-push (push) Canceled after 0s
ci / ci (22, ubuntu-latest) (push) Canceled after 0s
Multi-user image hosting with RBAC, upload preferences, and admin settings.
This commit is contained in:
commit
bc4cba7e52
115 files changed
+26508
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { createLegacySessionToken } from './access'
|
||||
|
||||
describe('createLegacySessionToken', () => {
|
||||
it('returns a stable hex digest for the same secret', async () => {
|
||||
const first = await createLegacySessionToken('test-secret')
|
||||
const second = await createLegacySessionToken('test-secret')
|
||||
expect(first).toBe(second)
|
||||
expect(first).toMatch(/^[0-9a-f]{64}$/)
|
||||
})
|
||||
|
||||
it('changes when the secret changes', async () => {
|
||||
const a = await createLegacySessionToken('secret-a')
|
||||
const b = await createLegacySessionToken('secret-b')
|
||||
expect(a).not.toBe(b)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user