Change fromstring to be from string
parent
d277795e16
commit
5520116292
|
|
@ -184,7 +184,10 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
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"]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue