Skip to content

Commit 99f3325

Browse files
committed
Fix tests
1 parent 1143764 commit 99f3325

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dsc_lib/src/functions/string.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ mod tests {
7575
#[test]
7676
fn string_from_null() {
7777
let mut parser = Statement::new().unwrap();
78-
let result = parser.parse_and_execute("[string(null)]", &Context::new()).unwrap();
78+
let result = parser.parse_and_execute("[string(null())]", &Context::new()).unwrap();
7979
assert_eq!(result, "null");
8080
}
8181

8282
#[test]
8383
fn string_from_array() {
8484
let mut parser = Statement::new().unwrap();
85-
let result = parser.parse_and_execute("[string(createArray('a', 1))]", &Context::new()).unwrap();
86-
assert_eq!(result, json!(["a", 1]).to_string());
85+
let result = parser.parse_and_execute("[string(createArray('a', 'b'))]", &Context::new()).unwrap();
86+
assert_eq!(result, json!(["a", "b"]).to_string());
8787
}
8888

8989
#[test]
9090
fn string_from_object() {
9191
let mut parser = Statement::new().unwrap();
92-
let result = parser.parse_and_execute("[string(createObject('a', 1))]", &Context::new()).unwrap();
93-
assert_eq!(result, json!({"a": 1}).to_string());
92+
let result = parser.parse_and_execute("[string(createObject('a', 'hello'))]", &Context::new()).unwrap();
93+
assert_eq!(result, json!({"a": "hello"}).to_string());
9494
}
9595
}

0 commit comments

Comments
 (0)