()
| 160 | |
| 161 | #[test] |
| 162 | fn sha256() { |
| 163 | // The sha1 digest is based on the normalized url |
| 164 | let url = parse("http://www.google.com"); |
| 165 | assert_eq!(url.normalized, "http://www.google.com/"); |
| 166 | assert_eq!(url.sha256, "3QFK9e1rONkTDj9Gb4UORtIblRGZ1ToY7ynuk0FhTq8"); |
| 167 | |
| 168 | let url = parse("http://some.url.com"); |
| 169 | assert_eq!(url.normalized, "http://some.url.com/"); |
| 170 | assert_eq!(url.sha256, "xUJjzElMux2Ebv6Fym7OQCIduMu1j0Dy8mWQrobMJbg"); |
| 171 | } |
| 172 | |
| 173 | #[test] |
| 174 | fn partial_eq() { |