woodpecker-ssg-deploy/main_test.go

16 lines
313 B
Go
Raw Normal View History

2024-01-05 21:21:16 +00:00
package main
import (
"testing"
)
func TestInsertToken(t *testing.T) {
res, err := insertToken("test-token", "https://git.example.org/user/repo.git")
if err != nil {
t.Fatalf("Error: %v", err)
}
if res != "https://test-token@git.example.org/user/repo.git" {
t.Fatalf("Unexpected output: %s", res)
}
}