fix(ai): 同步集成测试 create_prompt 签名 — 补充 analysis_type 参数
Prompt 管理 Phase 2 新增了 analysis_type 参数,但集成测试未同步。 5 处调用点全部补齐第 8 个参数。
This commit is contained in:
@@ -58,6 +58,7 @@ async fn prompt_create_and_get() {
|
||||
"Analyze: {{data}}".into(),
|
||||
serde_json::json!({"model": "claude"}),
|
||||
"analysis".into(),
|
||||
"lab_report".into(),
|
||||
)
|
||||
.await
|
||||
.expect("创建应成功");
|
||||
@@ -91,6 +92,7 @@ async fn prompt_list_with_category_filter() {
|
||||
"usr".into(),
|
||||
serde_json::json!({}),
|
||||
cat.into(),
|
||||
"lab_report".into(),
|
||||
)
|
||||
.await
|
||||
.expect("创建应成功");
|
||||
@@ -128,6 +130,7 @@ async fn prompt_activate_switches_version() {
|
||||
"usr".into(),
|
||||
serde_json::json!({}),
|
||||
"cat".into(),
|
||||
"lab_report".into(),
|
||||
)
|
||||
.await
|
||||
.expect("v1");
|
||||
@@ -187,6 +190,7 @@ async fn prompt_rollback_equals_activate() {
|
||||
"usr".into(),
|
||||
serde_json::json!({}),
|
||||
"cat".into(),
|
||||
"lab_report".into(),
|
||||
)
|
||||
.await
|
||||
.expect("v1");
|
||||
@@ -236,6 +240,7 @@ async fn prompt_cross_tenant_isolation() {
|
||||
"usr".into(),
|
||||
serde_json::json!({}),
|
||||
"cat".into(),
|
||||
"lab_report".into(),
|
||||
)
|
||||
.await
|
||||
.expect("create");
|
||||
@@ -496,7 +501,7 @@ async fn analysis_list_with_filters() {
|
||||
.await;
|
||||
|
||||
// 按 patient 筛选
|
||||
let (items, total) = svc
|
||||
let (_items, total) = svc
|
||||
.list_analysis(
|
||||
tenant_id,
|
||||
Some(patient_a),
|
||||
@@ -511,7 +516,7 @@ async fn analysis_list_with_filters() {
|
||||
assert_eq!(total, 2);
|
||||
|
||||
// 按 type 筛选
|
||||
let (items, total) = svc
|
||||
let (_items, total) = svc
|
||||
.list_analysis(
|
||||
tenant_id,
|
||||
None,
|
||||
|
||||
Reference in New Issue
Block a user