* [unittest] add test data.

This commit is contained in:
tianshujie
2025-12-24 16:56:25 +08:00
parent ca177c1a38
commit 6cc357f474
2 changed files with 14 additions and 5 deletions
+5 -5
View File
@@ -11,7 +11,7 @@ cid=16935
- user3只能看到2个有权限的看板 @2
- 返回数组格式 @array
- 验证看板2的名称正确属性2 @看板2
- user1看板访问权限受限 @0
- user1看板访问权限受限 @1
*/
@@ -28,15 +28,15 @@ $kanbanTest = new kanbanTest();
// 测试步骤1:管理员用户查看所有看板数量
su('admin');
r(count($kanbanTest->getPairsTest())) && p('') && e('5'); // 管理员可以看到所有5个看板
r(count($kanbanTest->getPairsTest())) && p() && e('5'); // 管理员可以看到所有5个看板
// 测试步骤2:普通用户查看可见看板数量
su('user3');
r(count($kanbanTest->getPairsTest())) && p('') && e('2'); // user3只能看到2个有权限的看板
r(count($kanbanTest->getPairsTest())) && p() && e('2'); // user3只能看到2个有权限的看板
// 测试步骤3:检查返回数据格式为键值对
su('admin');
r(gettype($kanbanTest->getPairsTest())) && p('') && e('array'); // 返回数组格式
r(gettype($kanbanTest->getPairsTest())) && p() && e('array'); // 返回数组格式
// 测试步骤4:验证看板名称获取正确性
su('user3');
@@ -44,4 +44,4 @@ r($kanbanTest->getPairsTest()) && p('2') && e('看板2'); // 验证看板2的名
// 测试步骤5:测试权限受限用户的看板访问
su('user1');
r(count($kanbanTest->getPairsTest())) && p('') && e('0'); // user1看板访问权限受限
r(count($kanbanTest->getPairsTest())) && p() && e('1'); // user1看板访问权限受限
+9
View File
@@ -0,0 +1,9 @@
title: table zt_kanbanspace
desc: 看板空间
author: Tian Shujie
version: "1.0"
fields:
- field: id
range: 1-100
- field: type
range: public,private