diff --git a/bundle/tests/git_test.go b/bundle/tests/git_test.go index 81d45de6..39da6491 100644 --- a/bundle/tests/git_test.go +++ b/bundle/tests/git_test.go @@ -12,6 +12,13 @@ import ( "github.com/stretchr/testify/assert" ) +func TestGitAutoLoad(t *testing.T) { + b := load(t, "./autoload_git", mutator.LoadGitDetails()) + assert.True(t, b.Config.Bundle.Git.Inferred) + validUrl := strings.Contains(b.Config.Bundle.Git.OriginURL, "/cli") || strings.Contains(b.Config.Bundle.Git.OriginURL, "/bricks") + assert.True(t, validUrl, fmt.Sprintf("Expected URL to contain '/cli' or '/bricks', got %s", b.Config.Bundle.Git.OriginURL)) +} + func TestGitManuallySetBranch(t *testing.T) { b := loadTarget(t, "./autoload_git", "production", mutator.LoadGitDetails()) assert.False(t, b.Config.Bundle.Git.Inferred)