aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2018-06-30 22:48:31 -0700
committerRichard Walters <rwalters@digitalstirling.com>2018-06-30 22:48:31 -0700
commitc261118f49e6508b12dfaf1c4547d92ec46e8cc2 (patch)
treef65ebe02da0ab9d392bb437a09d372aa05053861 /test
parent8c752fdcf71f1d8f3980c8066e2bedf782d9739c (diff)
Fix bug in not clearing userInfo when there is no authority
Diffstat (limited to 'test')
-rw-r--r--test/src/UriTests.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp
index a8ecd5b..6ee57c4 100644
--- a/test/src/UriTests.cpp
+++ b/test/src/UriTests.cpp
@@ -228,3 +228,10 @@ TEST(UriTests, ParseFromStringUserInfo) {
++index;
}
}
+
+TEST(UriTests, ParseFromStringTwiceFirstUserInfoThenWithout) {
+ Uri::Uri uri;
+ ASSERT_TRUE(uri.ParseFromString("http://joe@www.example.com/foo/bar"));
+ ASSERT_TRUE(uri.ParseFromString("/foo/bar"));
+ ASSERT_TRUE(uri.GetUserInfo().empty());
+}