Check that the input text appears in the kagi-fastgpt-prompt call
This commit is contained in:
parent
1bdbb69000
commit
8e68af9216
1 changed files with 3 additions and 1 deletions
|
@ -172,7 +172,9 @@ https://www.example.com"
|
||||||
(spy-on #'kagi-fastgpt-prompt))
|
(spy-on #'kagi-fastgpt-prompt))
|
||||||
(it "calls kagi-fastgpt-prompt"
|
(it "calls kagi-fastgpt-prompt"
|
||||||
(kagi-proofread "foo")
|
(kagi-proofread "foo")
|
||||||
(expect #'kagi-fastgpt-prompt :to-have-been-called))
|
(expect #'kagi-fastgpt-prompt :to-have-been-called)
|
||||||
|
(let ((args (spy-calls-args-for #'kagi-fastgpt-prompt 0)))
|
||||||
|
(expect (nth 0 args) :to-match "foo")))
|
||||||
(it "reads text from the region if active"
|
(it "reads text from the region if active"
|
||||||
(spy-on #'use-region-p :and-return-value t)
|
(spy-on #'use-region-p :and-return-value t)
|
||||||
(spy-on #'buffer-substring-no-properties :and-return-value "region text")
|
(spy-on #'buffer-substring-no-properties :and-return-value "region text")
|
||||||
|
|
Loading…
Reference in a new issue