19
main_test.go
Normal file
19
main_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIsGitRepository(t *testing.T) {
|
||||
result := isGitRepository()
|
||||
if !result {
|
||||
t.Errorf("isGitRepository() = false in a git repository")
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoteExists(t *testing.T) {
|
||||
result := remoteExists("nonexistent-remote-xyz")
|
||||
if result {
|
||||
t.Errorf("remoteExists(\"nonexistent-remote-xyz\") = true, want false")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user