mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
add tests for name validation change
This commit is contained in:
@@ -37,7 +37,7 @@ describe("repository name validation", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should allow same names as the backend", () => {
|
it("should allow same names as the backend", () => {
|
||||||
const validPaths = ["scm", "s", "sc", ".hiddenrepo", "b.", "...", "..c", "d..", "a..c"];
|
const validPaths = ["scm", "scm.gitz", "s", "sc", ".hiddenrepo", "b.", "...", "..c", "d..", "a..c"];
|
||||||
|
|
||||||
validPaths.forEach(path => expect(validator.isNameValid(path)).toBe(true));
|
validPaths.forEach(path => expect(validator.isNameValid(path)).toBe(true));
|
||||||
});
|
});
|
||||||
@@ -91,7 +91,8 @@ describe("repository name validation", () => {
|
|||||||
"a/..b",
|
"a/..b",
|
||||||
"scm/main",
|
"scm/main",
|
||||||
"scm/plugins/git-plugin",
|
"scm/plugins/git-plugin",
|
||||||
"scm/plugins/git-plugin"
|
"scm/plugins/git-plugin",
|
||||||
|
"scm.git"
|
||||||
];
|
];
|
||||||
|
|
||||||
invalidPaths.forEach(path => expect(validator.isNameValid(path)).toBe(false));
|
invalidPaths.forEach(path => expect(validator.isNameValid(path)).toBe(false));
|
||||||
|
|||||||
Reference in New Issue
Block a user