()
| 83 | |
| 84 | #[test] |
| 85 | fn test_extract_prefix_map() { |
| 86 | let mut options = Options::new(); |
| 87 | options.set("header.Content-Type", "application/json"); |
| 88 | options.set("header.Authorization", "Bearer token"); |
| 89 | options.set("other.key", "value"); |
| 90 | |
| 91 | let headers = RESTUtil::extract_prefix_map(&options, "header."); |
| 92 | assert_eq!(headers.len(), 2); |
| 93 | assert_eq!( |
| 94 | headers.get("Content-Type"), |
| 95 | Some(&"application/json".to_string()) |
| 96 | ); |
| 97 | } |
| 98 | } |