@@ -32,7 +32,7 @@ vi.mock('vue-i18n', async () => {
3232describe ( 'useTweetComposer' , ( ) => {
3333 let tweetContent : ReturnType < typeof ref < string > > ;
3434 let media : ReturnType < typeof ref < MediaItem [ ] > > ;
35- let replyToTweetId : ReturnType < typeof ref < string | null > > ;
35+ let quoteToTweetId : ReturnType < typeof ref < string | null > > ;
3636
3737 const mockUploadImage = vi . fn ( ) ;
3838 const mockUploadVideo = vi . fn ( ) ;
@@ -44,7 +44,7 @@ describe('useTweetComposer', () => {
4444
4545 tweetContent = ref ( '' ) ;
4646 media = ref ( [ ] ) ;
47- replyToTweetId = ref ( null ) ;
47+ quoteToTweetId = ref ( null ) ;
4848
4949 ( uploadMediaService as ReturnType < typeof vi . fn > ) . mockReturnValue ( {
5050 uploadImage : mockUploadImage ,
@@ -94,6 +94,7 @@ describe('useTweetComposer', () => {
9494 expect ( mockCreateTweetService ) . toHaveBeenCalledWith ( {
9595 content : 'Test tweet' ,
9696 media : [ ] ,
97+ quoteToTweetId : null ,
9798 replyToTweetId : null ,
9899 } ) ;
99100 expect ( result ) . toEqual ( mockTweet ) ;
@@ -116,6 +117,7 @@ describe('useTweetComposer', () => {
116117 expect ( mockCreateTweetService ) . toHaveBeenCalledWith ( {
117118 content : 'Tweet with image' ,
118119 media : [ 'media-id-1' ] ,
120+ quoteToTweetId : null ,
119121 replyToTweetId : null ,
120122 } ) ;
121123 expect ( result ) . toEqual ( mockTweet ) ;
@@ -137,20 +139,21 @@ describe('useTweetComposer', () => {
137139 expect ( result ) . toEqual ( mockTweet ) ;
138140 } ) ;
139141
140- it ( 'includes replyToTweetId when provided' , async ( ) => {
141- replyToTweetId . value = 'parent-tweet-id' ;
142- const composer = useTweetComposer ( tweetContent , media , replyToTweetId ) ;
142+ it ( 'includes quoteToTweetId when provided' , async ( ) => {
143+ quoteToTweetId . value = 'parent-tweet-id' ;
144+ const composer = useTweetComposer ( tweetContent , media , null , quoteToTweetId ) ;
143145 tweetContent . value = 'Reply tweet' ;
144146
145- const mockTweet = { id : '2' , content : 'Reply tweet' , replyTo : 'parent-tweet-id' } ;
147+ const mockTweet = { id : '2' , content : 'Reply tweet' , quoteTo : 'parent-tweet-id' } ;
146148 mockCreateTweetService . mockResolvedValue ( mockTweet ) ;
147149
148150 const result = await composer . handlePost ( ) ;
149151
150152 expect ( mockCreateTweetService ) . toHaveBeenCalledWith ( {
151153 content : 'Reply tweet' ,
152154 media : [ ] ,
153- replyToTweetId : 'parent-tweet-id' ,
155+ quoteToTweetId : 'parent-tweet-id' ,
156+ replyToTweetId : null ,
154157 } ) ;
155158 expect ( result ) . toEqual ( mockTweet ) ;
156159 } ) ;
0 commit comments