aboutsummaryrefslogtreecommitdiff
path: root/models/repo_editor_test.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2019-10-24 01:51:46 -0700
committerGitHub <noreply@github.com>2019-10-24 01:51:46 -0700
commit01c8df01ec0608f1f25b2f1444adabb98fa5ee8a (patch)
treef8a7e5dd8d2a8c51e1ce2cabb9d33571a93314dd /models/repo_editor_test.go
parent613139e7bef81d3573e7988a47eb6765f3de347a (diff)
internal: move packages under this directory (#5836)
* Rename pkg -> internal * Rename routes -> route * Move route -> internal/route * Rename models -> db * Move db -> internal/db * Fix route2 -> route * Move cmd -> internal/cmd * Bump version
Diffstat (limited to 'models/repo_editor_test.go')
-rw-r--r--models/repo_editor_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/models/repo_editor_test.go b/models/repo_editor_test.go
deleted file mode 100644
index 396382e3..00000000
--- a/models/repo_editor_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2018 The Gogs 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 models
-
-import (
- "os"
- "testing"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func Test_isRepositoryGitPath(t *testing.T) {
- Convey("Check if path is or resides inside '.git'", t, func() {
- sep := string(os.PathSeparator)
- testCases := []struct {
- path string
- expect bool
- }{
- {"." + sep + ".git", true},
- {"." + sep + ".git" + sep + "", true},
- {"." + sep + ".git" + sep + "hooks" + sep + "pre-commit", true},
- {".git" + sep + "hooks", true},
- {"dir" + sep + ".git", true},
-
- {".gitignore", false},
- {"dir" + sep + ".gitkeep", false},
- }
- for _, tc := range testCases {
- So(isRepositoryGitPath(tc.path), ShouldEqual, tc.expect)
- }
- })
-}