feat(db+test): 菜单权限关联迁移 + 适配 create_message 签名变更
- 新增迁移 m097:为 17 个已有菜单设置 permission 字段,新增透析管理/资讯管理 2 个菜单 - 修复 consultation/pii_encryption 测试适配 create_message(sender_id, sender_role) 分离参数
This commit is contained in:
@@ -102,10 +102,9 @@ async fn test_consultation_message_send() {
|
||||
|
||||
let msg = consultation_service::create_message(
|
||||
app.health_state(), app.tenant_id(), Some(app.operator_id()),
|
||||
app.operator_id(), "doctor".to_string(),
|
||||
CreateMessageReq {
|
||||
session_id: session.id,
|
||||
sender_id: app.operator_id(),
|
||||
sender_role: "doctor".to_string(),
|
||||
content_type: Some("text".to_string()),
|
||||
content: "您好,有什么可以帮您?".to_string(),
|
||||
},
|
||||
@@ -132,10 +131,9 @@ async fn test_consultation_message_list() {
|
||||
for i in 0..3 {
|
||||
consultation_service::create_message(
|
||||
app.health_state(), app.tenant_id(), Some(app.operator_id()),
|
||||
app.operator_id(), "doctor".to_string(),
|
||||
CreateMessageReq {
|
||||
session_id: session.id,
|
||||
sender_id: app.operator_id(),
|
||||
sender_role: "doctor".to_string(),
|
||||
content_type: None,
|
||||
content: format!("消息{}", i + 1),
|
||||
},
|
||||
|
||||
@@ -269,10 +269,10 @@ async fn test_consultation_message_content_encrypted() {
|
||||
&state,
|
||||
tenant_id,
|
||||
Some(sender_id),
|
||||
sender_id,
|
||||
"patient".to_string(),
|
||||
CreateMessageReq {
|
||||
session_id: session.id,
|
||||
sender_id,
|
||||
sender_role: "patient".to_string(),
|
||||
content_type: Some("text".to_string()),
|
||||
content: plain_content.to_string(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user