File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
ychat/src/commonTest/kotlin Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ class YChatTest {
7676 @Test
7777 fun `on imageGenerations execute method should return result successfully` () {
7878 // arrange
79- val textResult = " This in indeed a test"
80- val imageGenerationsSuccessResult = MockStorage .imageGenerationsSuccessResult(textResult )
79+ val imageUrl = " https://testlink.com/image- test.jpg "
80+ val imageGenerationsSuccessResult = MockStorage .imageGenerationsSuccessResult(imageUrl )
8181 mockHttpEngine(imageGenerationsSuccessResult)
8282
8383 // act
@@ -90,7 +90,7 @@ class YChatTest {
9090 }
9191
9292 // assert
93- assertEquals(" https://testlink.com/image-test.jps " , result.first())
93+ assertEquals(" https://testlink.com/image-test.jpg " , result.first())
9494 }
9595
9696 private fun mockHttpEngine (result : String ) {
Original file line number Diff line number Diff line change @@ -14,5 +14,6 @@ object MockStorage {
1414 " \" choices\" :[{\" message\" :{\" role\" :\" assistant\" ,\" content\" :\" $text \" }," +
1515 " \" finish_reason\" :\" stop\" ,\" index\" :0}]}"
1616
17- fun imageGenerationsSuccessResult (text : String ) = " {\" created\" :1678805561,\" data\" :[{\" url\" :\" https://testlink.com/image-test.jps\" }]}"
17+ fun imageGenerationsSuccessResult (text : String ) =
18+ " {\" created\" :1678805561,\" data\" :[{\" url\" :\" $text \" }]}"
1819}
You can’t perform that action at this time.
0 commit comments