summaryrefslogtreecommitdiffstats
path: root/modules/repofiles/repofiles_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/repofiles/repofiles_test.go')
-rw-r--r--modules/repofiles/repofiles_test.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/modules/repofiles/repofiles_test.go b/modules/repofiles/repofiles_test.go
deleted file mode 100644
index 1686378a4a..0000000000
--- a/modules/repofiles/repofiles_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2019 The Gitea Authors. All rights reserved.
-// Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
-
-package repofiles
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestCleanUploadFileName(t *testing.T) {
- t.Run("Clean regular file", func(t *testing.T) {
- name := "this/is/test"
- cleanName := CleanUploadFileName(name)
- expectedCleanName := name
- assert.EqualValues(t, expectedCleanName, cleanName)
- })
-
- t.Run("Clean a .git path", func(t *testing.T) {
- name := "this/is/test/.git"
- cleanName := CleanUploadFileName(name)
- expectedCleanName := ""
- assert.EqualValues(t, expectedCleanName, cleanName)
- })
-}