refactor: move task, error and testing utils to separte repo; apply gofumpt

This commit is contained in:
yusing
2025-09-27 13:41:50 +08:00
parent 5043ef778f
commit 6776f20332
203 changed files with 696 additions and 2800 deletions

View File

@@ -5,7 +5,7 @@ import (
"testing"
"github.com/yusing/godoxy/internal/serialization"
. "github.com/yusing/godoxy/internal/utils/testing"
expect "github.com/yusing/goutils/testing"
)
func TestNotificationConfig(t *testing.T) {
@@ -183,11 +183,11 @@ func TestNotificationConfig(t *testing.T) {
provider := tt.cfg["provider"]
err := serialization.MapUnmarshalValidate(tt.cfg, &cfg)
if tt.wantErr {
ExpectHasError(t, err)
expect.NotNil(t, err)
} else {
ExpectNoError(t, err)
ExpectEqual(t, provider.(string), cfg.ProviderName)
ExpectEqual(t, cfg.Provider, tt.expected)
expect.NoError(t, err)
expect.Equal(t, provider.(string), cfg.ProviderName)
expect.Equal(t, cfg.Provider, tt.expected)
}
})
}