File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 3434 end
3535 end
3636
37- <<<<<<< HEAD
3837 describe ".translate" do
3938 before do
4039 post . set_detected_locale ( "de" )
5958 locale , translated_text = DiscourseTranslator ::DiscourseAi . translate ( topic )
6059 expect ( locale ) . to eq "de"
6160 expect ( translated_text ) . to eq "some translated text"
62- =======
63- describe ".translate!" do
64- before { post . set_detected_locale ( "de" ) }
65-
66- it "returns the translated text from the llm" do
67- DiscourseAi ::Completions ::Llm . with_prepared_responses ( [ "some translated text" ] ) do
68- expect ( DiscourseTranslator ::DiscourseAi . translate! ( post ) ) . to eq "some translated text"
6961 end
7062 end
7163
7264 it "sends the content for splitting and the split content for translation" do
7365 post . update ( raw : "#{ "a" * 3000 } #{ "b" * 3000 } " )
7466 DiscourseAi ::Completions ::Llm . with_prepared_responses ( %w[ lol wut ] ) do
7567 expect ( DiscourseTranslator ::DiscourseAi . translate! ( post ) ) . to eq "lolwut"
76- >>>>>>> 9 dd4245 ( FIX : Split raw content to prevent job from timing out )
7768 end
7869 end
7970 end
You can’t perform that action at this time.
0 commit comments