Skip to content

Commit c880732

Browse files
committed
feat: adjusted tests to new agrument signature of http functions
1 parent c32f09d commit c880732

1 file changed

Lines changed: 8 additions & 20 deletions

File tree

  • crates/taurus-core/src/runtime/functions

crates/taurus-core/src/runtime/functions/http.rs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -565,26 +565,14 @@ mod tests {
565565
let request_headers = Struct {
566566
fields: HashMap::from([("x-bool".to_string(), true.to_value())]),
567567
};
568-
let request = Struct {
569-
fields: HashMap::from([
570-
("http_method".to_string(), string_value("POST")),
571-
(
572-
"url".to_string(),
573-
string_value(&format!("http://{}/echo?x=1", addr)),
574-
),
575-
(
576-
"headers".to_string(),
577-
Value {
578-
kind: Some(Kind::StructValue(request_headers)),
579-
},
580-
),
581-
("payload".to_string(), request_payload),
582-
]),
583-
};
584-
585-
let args = vec![Argument::Eval(Value {
586-
kind: Some(Kind::StructValue(request)),
587-
})];
568+
let args = vec![
569+
Argument::Eval(string_value("POST")),
570+
Argument::Eval(Value {
571+
kind: Some(Kind::StructValue(request_headers)),
572+
}),
573+
Argument::Eval(string_value(&format!("http://{}/echo?x=1", addr))),
574+
Argument::Eval(request_payload),
575+
];
588576
let mut ctx = ValueStore::default();
589577
let mut run = |_: &crate::handler::argument::Thunk, _: &mut ValueStore| Signal::Stop;
590578

0 commit comments

Comments
 (0)