Skip to content

Commit ffc92be

Browse files
author
vsilent
committed
fix: add missing fields to MarketplaceWebhookPayload and StackTemplate test initializers
1 parent ec791b1 commit ffc92be

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/marketplace_integration.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ fn test_webhook_payload_for_template_approval() {
154154
vendor_name: Some("John Doe".to_string()),
155155
category: Some("AI Agents".to_string()),
156156
tags: Some(serde_json::json!(["ai", "agents", "marketplace"])),
157+
long_description: None,
158+
tech_stack: None,
159+
creator_name: Some("John Doe".to_string()),
160+
deploy_count: Some(10),
161+
view_count: Some(100),
162+
approved_at: Some("2026-02-11T00:00:00Z".to_string()),
163+
required_plan_name: None,
157164
};
158165

159166
// Verify payload has all required fields for approval
@@ -184,6 +191,13 @@ fn test_webhook_payload_for_template_update_price() {
184191
vendor_name: Some("John Doe".to_string()),
185192
category: Some("AI Agents".to_string()),
186193
tags: Some(serde_json::json!(["ai", "agents", "v2"])),
194+
long_description: None,
195+
tech_stack: None,
196+
creator_name: Some("John Doe".to_string()),
197+
deploy_count: None,
198+
view_count: None,
199+
approved_at: None,
200+
required_plan_name: None,
187201
};
188202

189203
assert_eq!(payload.action, "template_updated");
@@ -209,6 +223,13 @@ fn test_webhook_payload_for_template_rejection() {
209223
vendor_name: None,
210224
category: None,
211225
tags: None,
226+
long_description: None,
227+
tech_stack: None,
228+
creator_name: None,
229+
deploy_count: None,
230+
view_count: None,
231+
approved_at: None,
232+
required_plan_name: None,
212233
};
213234

214235
assert_eq!(payload.action, "template_rejected");
@@ -377,6 +398,9 @@ async fn test_multiple_deployments_mixed_templates() {
377398
long_description: None,
378399
category_code: Some("test".to_string()),
379400
product_id: None,
401+
price: None,
402+
billing_cycle: None,
403+
currency: None,
380404
tags: serde_json::json!([]),
381405
tech_stack: serde_json::json!([]),
382406
status: "approved".to_string(),

0 commit comments

Comments
 (0)