chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)
This commit is contained in:
commit
9097ee699d
5769 files changed
+1446466
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestCreateAutomationPreservesModelOverride(t *testing.T) {
|
||||
var req CreateAutomationRequest
|
||||
require.NoError(t, json.Unmarshal([]byte(`{
|
||||
"name": "Digest", "instruction": "Summarize the news",
|
||||
"model_id": "selected-model",
|
||||
"trigger": {"type": "cron", "expr": "0 9 * * *"}
|
||||
}`), &req))
|
||||
require.NotNil(t, req.patch().ModelID)
|
||||
require.Equal(t, "selected-model", *req.patch().ModelID)
|
||||
}
|
||||
Reference in new issue
Block a user