mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 18:28:20 +00:00
* feat(storage): add archive storage support for assets * fix(webui): show archive icon in front of file name in breadcrumb bar * fix(webui): display archive icon in breadcrumbs when restoring * refactor(transcode): simplify restore asset workflow to single while loop * docs(configuration): add archive storage documentation and readme entries * fix(webui): show archive icon in front of version names and prevent version card overflow * fix(webui): fix overflow in manage versions dialog scroll area * fix(webui): prevent manage versions dialog overflow on long file names * docs(configuration): fix archive storage environment variables and defaults * fix(storage): address code review findings for archive storage
35 lines
867 B
TypeScript
35 lines
867 B
TypeScript
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'
|
|
import { Hono } from 'hono'
|
|
import authnRoute from './authn'
|
|
import { teamService } from '@shumai/core/src/team/team'
|
|
|
|
describe('authn api', () => {
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
let mockGetSignupInfo: any
|
|
|
|
beforeEach(() => {
|
|
mockGetSignupInfo = vi.spyOn(teamService, 'getSignupInfo')
|
|
})
|
|
|
|
afterEach(() => {
|
|
vi.restoreAllMocks()
|
|
})
|
|
|
|
it('GET /signup-info', async () => {
|
|
mockGetSignupInfo.mockResolvedValue({
|
|
initialized: true,
|
|
demoMode: false,
|
|
})
|
|
|
|
const app = new Hono().route('/', authnRoute)
|
|
const res = await app.request('/signup-info')
|
|
|
|
expect(res.status).toBe(200)
|
|
expect(await res.json()).toEqual({
|
|
initialized: true,
|
|
demoMode: false,
|
|
archiveStorageEnabled: false,
|
|
})
|
|
})
|
|
})
|