Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/source/gitlab/gitlab_test.go')
-rw-r--r--internal/source/gitlab/gitlab_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/source/gitlab/gitlab_test.go b/internal/source/gitlab/gitlab_test.go
index 095fc2eb..6d5d978a 100644
--- a/internal/source/gitlab/gitlab_test.go
+++ b/internal/source/gitlab/gitlab_test.go
@@ -116,6 +116,20 @@ func TestResolve(t *testing.T) {
expectedPath: "some/path/to/project/",
expectedSubPath: "index.html",
},
+ "when project name requested is capitalized": {
+ file: "client/testdata/test.gitlab.io.json",
+ target: "https://test.gitlab.io:443/My/CapitalizedPrefix",
+ expectedPrefix: "/my/capitalizedprefix/",
+ expectedPath: "some/path/to/project/",
+ expectedSubPath: "",
+ },
+ "when project name and requested path are capitalized": {
+ file: "client/testdata/test.gitlab.io.json",
+ target: "https://test.gitlab.io:443/My/CapitalizedPrefix/Path/Index.html",
+ expectedPrefix: "/my/capitalizedprefix/",
+ expectedPath: "some/path/to/project/",
+ expectedSubPath: "Path/Index.html",
+ },
}
for name, tc := range tests {