Skip to content

Commit eeb54fe

Browse files
committed
Some more fixes for the tests.
1 parent 2744201 commit eeb54fe

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

test/eca/features/chat_tool_call_state_test.clj

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
(let [result (#'f.chat/transition-tool-call! db* chat-ctx tool-call-id :tool-prepare event-data)]
124124

125125
(is (match? {:status :preparing
126-
:actions [:send-toolCallPrepare]}
126+
:actions [:send-toolCallPrepare :init-decision-reason]}
127127
result)
128128
"Expected return value to show :preparing status and send toolCallPrepare action")
129129

@@ -240,7 +240,6 @@
240240
(is (= 1 (count run-messages)) "Expected exactly one toolCallRun notification to be sent")
241241

242242
(is (match? {:chat-id chat-id
243-
:request-id "req-1"
244243
:role :assistant
245244
:content (merge {:type :toolCallRun
246245
:id tool-call-id}
@@ -477,10 +476,10 @@
477476
{:approved?* approved?* :name "test" :origin "test" :arguments {} :manual-approval false})
478477

479478
(let [result (#'f.chat/transition-tool-call! db* chat-ctx "tool-check" :stop-requested)]
480-
(is (match? {:status :stopped
481-
:actions [:send-toolCallRejected]}
479+
(is (match? {:status :rejected
480+
:actions [:set-decision-reason :deliver-approval-false]}
482481
result)
483-
"Expected transition from :check-approval to :stopped with send toolCallRejected action"))))
482+
"Expected transition from :check-approval to :rejected with relevant actions"))))
484483

485484
;; Test :completed -> :stopped (should be no-op or error)
486485
(testing ":completed -> :stopped (should handle gracefully)"
@@ -552,9 +551,9 @@
552551
(is (match? {:status :rejected
553552
:actions [:set-decision-reason :deliver-approval-false]}
554553
result)
555-
"Expected transition to :stopped with deliver approval false action")
556-
(is (= :stopped (:status (#'f.chat/get-tool-call-state @db* chat-id "tool-2")))
557-
"Expected tool call state to be in :stopped status")
554+
"Expected transition to :refected with deliver approval false action")
555+
(is (= :rejected (:status (#'f.chat/get-tool-call-state @db* chat-id "tool-2")))
556+
"Expected tool call state to be in :rejected status")
558557
(is (= false (deref approved?* 100 :timeout))
559558
"Expected promise to be delivered with false value"))))
560559

0 commit comments

Comments
 (0)