mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-04-24 03:00:15 -04:00
feat: simplify setup logic
This commit is contained in:
23
cli/cli_test.go
Normal file
23
cli/cli_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/danielmiessler/fabric/db"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCli(t *testing.T) {
|
||||
message, err := Cli()
|
||||
assert.NoError(t, err)
|
||||
assert.Empty(t, message)
|
||||
}
|
||||
|
||||
func TestSetup(t *testing.T) {
|
||||
mockDB := db.NewDb(os.TempDir())
|
||||
|
||||
fabric, err := Setup(mockDB, false)
|
||||
assert.Error(t, err)
|
||||
assert.Nil(t, fabric)
|
||||
}
|
||||
Reference in New Issue
Block a user