diff options
-rw-r--r-- | test/src/UriTests.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp index a57dea1..637bfb7 100644 --- a/test/src/UriTests.cpp +++ b/test/src/UriTests.cpp @@ -898,3 +898,11 @@ TEST(UriTests, AssignACopy) { EXPECT_EQ("http://www.example.com/foo.txt?bar", uri1.GenerateString()); EXPECT_EQ("http://example.com/foo.txt#page2", uri2.GenerateString()); } + +TEST(UriTests, ClearQuery) { + Uri::Uri uri; + (void)uri.ParseFromString("http://www.example.com/?foo=bar"); + uri.ClearQuery(); + EXPECT_EQ("http://www.example.com/", uri.GenerateString()); + EXPECT_FALSE(uri.HasQuery()); +} |