spud/service_definition/fetcher_test.go

19 lines
408 B
Go

package service_definition
import (
"testing"
)
func TestGetPathTypeDetectsGitPathPrefix(t *testing.T) {
actual := GetPathType("git+https://test.com")
if actual != "git" {
t.Errorf("Expected 'git' type, got %s", actual)
}
}
func TestGetPathTypeDetectsFileNoPrefix(t *testing.T) {
actual := GetPathType("file/path.yml")
if actual != "file" {
t.Errorf("Expected 'file' type, got %s", actual)
}
}