|
@@ -138,7 +138,8 @@ describe('文件路由API集成测试 (使用hono/testing)', () => {
|
|
|
it('应该拒绝创建无效文件数据的请求', async () => {
|
|
it('应该拒绝创建无效文件数据的请求', async () => {
|
|
|
const invalidFileData = {
|
|
const invalidFileData = {
|
|
|
name: '', // 空文件名
|
|
name: '', // 空文件名
|
|
|
- type: 'text/plain'
|
|
|
|
|
|
|
+ type: 'text/plain',
|
|
|
|
|
+ path: 'test/path.txt'
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const response = await client['upload-policy'].$post({
|
|
const response = await client['upload-policy'].$post({
|
|
@@ -509,7 +510,8 @@ describe('文件路由API集成测试 (使用hono/testing)', () => {
|
|
|
json: {
|
|
json: {
|
|
|
name: 'test_expired_token.txt',
|
|
name: 'test_expired_token.txt',
|
|
|
type: 'text/plain',
|
|
type: 'text/plain',
|
|
|
- size: 1024
|
|
|
|
|
|
|
+ size: 1024,
|
|
|
|
|
+ path: 'test/expired_token.txt'
|
|
|
}
|
|
}
|
|
|
}, {
|
|
}, {
|
|
|
headers: {
|
|
headers: {
|
|
@@ -530,7 +532,8 @@ describe('文件路由API集成测试 (使用hono/testing)', () => {
|
|
|
json: {
|
|
json: {
|
|
|
name: 'test_bad_auth_header.txt',
|
|
name: 'test_bad_auth_header.txt',
|
|
|
type: 'text/plain',
|
|
type: 'text/plain',
|
|
|
- size: 1024
|
|
|
|
|
|
|
+ size: 1024,
|
|
|
|
|
+ path: 'test/bad_auth_header.txt'
|
|
|
}
|
|
}
|
|
|
}, {
|
|
}, {
|
|
|
headers: {
|
|
headers: {
|