Skip to content

Commit dd1ed8a

Browse files
committed
test: added extra test case with port numbers
1 parent 613d3d4 commit dd1ed8a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/uri/authority.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,14 @@ mod tests {
546546
assert_eq!(authority2, authority1);
547547
}
548548

549+
#[test]
550+
fn equal_to_self_of_same_authority_with_port() {
551+
let authority1: Authority = "example.com:80".parse().unwrap();
552+
let authority2: Authority = "EXAMPLE.COM:80".parse().unwrap();
553+
assert_eq!(authority1, authority2);
554+
assert_eq!(authority2, authority1);
555+
}
556+
549557
#[test]
550558
fn not_equal_to_self_of_different_authority() {
551559
let authority1: Authority = "example.com".parse().unwrap();

0 commit comments

Comments
 (0)