Handle git urls with trailing .git suffix correctly

This commit is contained in:
René Pfeuffer
2018-09-10 11:03:10 +02:00
parent 50a4133dff
commit 6bc41cee0a
3 changed files with 16 additions and 2 deletions

View File

@@ -25,6 +25,15 @@ public class NamespaceAndNameFromPathExtractorTest {
).map(this::createCorrectTest);
}
@TestFactory
Stream<DynamicNode> shouldHandleTrailingDotSomethings() {
return Stream.of(
"/space/repo.git",
"/space/repo.and.more",
"/space/repo."
).map(this::createCorrectTest);
}
private DynamicTest createCorrectTest(String path) {
return dynamicTest(
"should extract correct namespace and name for path " + path,