File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
LinkDotNet.Blog.UnitTests/Web/Shared
LinkDotNet.Blog.Web/Shared Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ public async Task ShouldNotThrowExceptionToOutsideWorld()
91
91
92
92
[ InlineData ( "http://localhost/blogPost/12?q=3" , "blogPost/12" ) ]
93
93
[ InlineData ( "http://localhost/?q=3" , "" ) ]
94
+ [ InlineData ( "" , "" ) ]
95
+ [ InlineData ( "http://localhost/someroute/subroute" , "someroute/subroute" ) ]
94
96
[ Theory ]
95
97
public async Task ShouldRemoveQueryStringIfPresent ( string url , string expectedRecord )
96
98
{
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ private string GetClickedUrl()
91
91
}
92
92
93
93
var queryIndex = basePath . IndexOf ( '?' ) ;
94
- return queryIndex < = 0 ? basePath [ ..( queryIndex - 1 ) ] : basePath ;
94
+ return queryIndex > = 0 ? basePath [ ..queryIndex ] : basePath ;
95
95
}
96
96
}
97
97
}
You can’t perform that action at this time.
0 commit comments