spud/service_definition/fetcher_test.go

20 lines
408 B
Go
Raw Normal View History

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)
}
}