]> git.giacomolli.uk - onechat/blobdiff - prompt_test.go
Log each schedule run by its ID
[onechat] / prompt_test.go
index 4aa985f6dcd49ed8bfa4de4f91be1240839e1fe8..043cc9908e09c24bfe55c83dd39c8825857d2c7c 100644 (file)
@@ -77,7 +77,7 @@ func TestPromptWithoutInstructionsHasNoClause(t *testing.T) {
 
 func TestAgentToolsAreStrictAndStable(t *testing.T) {
        tools := promptTools()
 
 func TestAgentToolsAreStrictAndStable(t *testing.T) {
        tools := promptTools()
-       require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit", "spawn", "tell", "whatsapp_find"}, promptToolNames(tools))
+       require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit", "spawn", "tell", "whatsapp_find", "whatsapp_send", "schedule_set", "schedule_list", "schedule_remove"}, promptToolNames(tools))
        require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit"}, promptToolNames(promptSubagentTools()))
 
        for _, tool := range tools {
        require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit"}, promptToolNames(promptSubagentTools()))
 
        for _, tool := range tools {
@@ -85,7 +85,7 @@ func TestAgentToolsAreStrictAndStable(t *testing.T) {
                properties := schema["properties"].(map[string]any)
                require.True(t, tool.Strict, tool.Name)
                require.Equal(t, false, schema["additionalProperties"], tool.Name)
                properties := schema["properties"].(map[string]any)
                require.True(t, tool.Strict, tool.Name)
                require.Equal(t, false, schema["additionalProperties"], tool.Name)
-               require.Equal(t, slices.Sorted(maps.Keys(properties)), schema["required"], tool.Name)
+               require.ElementsMatch(t, slices.Collect(maps.Keys(properties)), schema["required"], tool.Name)
        }
 
        first, err := json.Marshal(tools)
        }
 
        first, err := json.Marshal(tools)