mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 03:14:03 +03:00
Move cli to internal
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
)
|
||||
|
||||
type BaseTestSuite struct {
|
||||
suite.Suite
|
||||
|
||||
b base
|
||||
}
|
||||
|
||||
func (suite *BaseTestSuite) SetupTest() {
|
||||
suite.b = base{}
|
||||
}
|
||||
|
||||
func (suite *BaseTestSuite) TestReadConfigNok() {
|
||||
suite.b.ConfigPath = filepath.Join("testdata", "unknown")
|
||||
suite.Error(suite.b.ReadConfig("dev"))
|
||||
}
|
||||
|
||||
func (suite *BaseTestSuite) TestReadConfig() {
|
||||
suite.b.ConfigPath = filepath.Join("testdata", "minimal.toml")
|
||||
suite.NoError(suite.b.ReadConfig("dev"))
|
||||
}
|
||||
|
||||
func TestBase(t *testing.T) {
|
||||
t.Parallel()
|
||||
suite.Run(t, &BaseTestSuite{})
|
||||
}
|
||||
Reference in New Issue
Block a user