diff --git a/router/CHANGES.txt b/router/CHANGES.txt new file mode 100644 index 00000000..e55b3be8 --- /dev/null +++ b/router/CHANGES.txt @@ -0,0 +1,5 @@ +# Changes + +## [0.1.0] - 2019-03-09 + +* Initial release diff --git a/router/src/path.rs b/router/src/path.rs index c38a0a01..6e25519e 100644 --- a/router/src/path.rs +++ b/router/src/path.rs @@ -208,32 +208,3 @@ impl Resource for Path { self } } - -#[cfg(test)] -mod tests { - use super::*; - - #[cfg(feature = "http")] - #[test] - fn test_get_param_by_name() { - use crate::Url; - use http::{HttpTryFrom, Uri}; - - let mut params = Path::new(Url::new(Uri::try_from("/").unwrap())); - params.add_static("item1", "path"); - params.add_static("item2", "http%3A%2F%2Flocalhost%3A80%2Ffoo"); - - assert_eq!(params.get("item0"), None); - assert_eq!(params.get_decoded("item0"), None); - assert_eq!(params.get("item1"), Some("path")); - assert_eq!(params.get_decoded("item1").unwrap().to_owned(), "path"); - assert_eq!( - params.get("item2"), - Some("http%3A%2F%2Flocalhost%3A80%2Ffoo") - ); - assert_eq!( - params.get_decoded("item2").unwrap().to_owned(), - "http://localhost:80/foo" - ); - } -}