This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::request::{Request, Intent};
|
||||
use crate::request::{Intent, Request};
|
||||
|
||||
#[test]
|
||||
fn deserialize() {
|
||||
|
||||
let json = r#"{
|
||||
"requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
|
||||
"inputs": [
|
||||
@@ -18,12 +17,14 @@ mod tests {
|
||||
|
||||
println!("{:?}", req);
|
||||
|
||||
assert_eq!(req.request_id, "ff36a3cc-ec34-11e6-b1a0-64510650abcf".to_owned());
|
||||
assert_eq!(
|
||||
req.request_id,
|
||||
"ff36a3cc-ec34-11e6-b1a0-64510650abcf".to_owned()
|
||||
);
|
||||
assert_eq!(req.inputs.len(), 1);
|
||||
match req.inputs[0] {
|
||||
Intent::Sync => {},
|
||||
_ => panic!("Expected Sync intent")
|
||||
Intent::Sync => {}
|
||||
_ => panic!("Expected Sync intent"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user