package gocmd_test

import (
	"context"
	"os"
	"testing"

	"github.com/stretchr/testify/assert"

	"git.cw.tr/mukan-network/mukan-ignite/ignite/pkg/gocmd"
)

func TestList(t *testing.T) {
	wd, err := os.Getwd()
	assert.NoError(t, err)

	ctx := context.Background()
	packages, err := gocmd.List(ctx, wd, []string{"-m", "-f={{.Path}}", "git.cw.tr/mukan-network/mukan-ignite"})
	assert.NoError(t, err)

	assert.Contains(t, packages, "git.cw.tr/mukan-network/mukan-ignite")
}
