mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 05:24:22 +01:00
rm some silly logic, better comments
This commit is contained in:
1 parent
fa498287b9
commit
8e59bf766a
7 files changed
+60
-83
No files matched your search
+8
-5
@@ -5,13 +5,16 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNewLocalRepo(t *testing.T) {
|
||||
r := newLocalRepo("")
|
||||
if r.path != "" {
|
||||
func TestNewRepo(t *testing.T) {
|
||||
// local mode
|
||||
r := newRepo("repo", "", "some/repo")
|
||||
if r.name != "repo" || r.path != "some/repo" {
|
||||
t.Error()
|
||||
}
|
||||
r = newLocalRepo("some/path")
|
||||
if r.name != "path" || r.path != "some/path" {
|
||||
|
||||
// repo/owner mode
|
||||
r = newRepo("repo", "github.com/owner/repo", "some/repo")
|
||||
if r.name != "repo" || r.path != "some/repo" {
|
||||
t.Error()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user