()
| 417 | |
| 418 | #[tokio::test] |
| 419 | pub async fn test_encode_fport() { |
| 420 | let encoder = r#" |
| 421 | function encodeDownlink(input) { |
| 422 | return { |
| 423 | fPort: 20, |
| 424 | bytes: [], |
| 425 | }; |
| 426 | } |
| 427 | "# |
| 428 | .to_string(); |
| 429 | |
| 430 | let vars: HashMap<String, String> = HashMap::new(); |
| 431 | |
| 432 | let input = prost_types::Struct::default(); |
| 433 | |
| 434 | let out = encode(10, &vars, &encoder, &input).await.unwrap(); |
| 435 | assert_eq!((20, vec![]), out); |
| 436 | } |
| 437 | } |