mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-19 10:14:21 -05:00
- Remove `NoSessionPatternUserMessages` constant from `chatter.go` - Replace direct constant reference with `i18n.T()` translation call - Update test import from `core` package to `i18n` package - Update test assertion to use localized error message lookup
22 lines
451 B
Go
22 lines
451 B
Go
package cli
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/danielmiessler/fabric/internal/i18n"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestCli(t *testing.T) {
|
|
t.Skip("Skipping test for now, collision with flag -t")
|
|
originalArgs := os.Args
|
|
defer func() { os.Args = originalArgs }()
|
|
|
|
os.Args = []string{os.Args[0]}
|
|
err := Cli("test")
|
|
assert.Error(t, err)
|
|
assert.Equal(t, i18n.T("chatter_error_no_session_pattern_user_messages"), err.Error())
|
|
}
|