()
| 199 | |
| 200 | #[test] |
| 201 | fn ends_with() { |
| 202 | let url = parse("https://www.dni.gov//Prelimary-Assessment-UAP-20210625.pdf?q=something"); |
| 203 | assert!(url.ends_with(".pdf")); |
| 204 | |
| 205 | let url = parse("https://www.dni.gov//Prelimary-Assessment-UAP-20210625.html?q=something"); |
| 206 | assert!(!url.ends_with(".pdf")); |
| 207 | } |
| 208 | |
| 209 | #[test] |
| 210 | fn is_pdf() { |