Change fromstring to be from string
parent
1a96918524
commit
580d904319
|
|
@ -184,7 +184,10 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn sources() {
|
fn sources() {
|
||||||
let ge = GameEvent::new(r#"{"body": "{\"sources\": [\"a\", \"b\"]}"}"#.to_string());
|
let d = json::object!{
|
||||||
|
"sources": ["a", "b"],
|
||||||
|
};
|
||||||
|
let ge = GameEvent::new(d.dump());
|
||||||
assert!(ge.sources() == vec!["a", "b"]);
|
assert!(ge.sources() == vec!["a", "b"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue