@@ -30,6 +30,7 @@ import { OpportunityState } from '@dailydotdev/schema';
3030import { generateShortId } from '../src/ids' ;
3131import { OpportunityUser } from '../src/entity/opportunities/user' ;
3232import { OpportunityUserType } from '../src/entity/opportunities/types' ;
33+ import { QuestionFeedback } from '../src/entity/questions/QuestionFeedback' ;
3334
3435jest . mock ( '../src/common/geo' , ( ) => ( {
3536 ...( jest . requireActual ( '../src/common/geo' ) as Record < string , unknown > ) ,
@@ -1246,6 +1247,17 @@ describe('POST /p/newOpportunity', () => {
12461247 expect ( [ 'javascript' , 'typescript' , 'react' ] ) . toEqual (
12471248 expect . arrayContaining ( keywords . map ( ( k ) => k . keyword ) ) ,
12481249 ) ;
1250+
1251+ const questionsFeedback = await con . getRepository ( QuestionFeedback ) . find ( {
1252+ where : { opportunityId : opportunity ?. id } ,
1253+ } ) ;
1254+ expect ( questionsFeedback ) . toHaveLength ( 1 ) ;
1255+
1256+ expect ( questionsFeedback [ 0 ] ) . toMatchObject ( {
1257+ opportunityId : opportunity ?. id ,
1258+ title : 'Why did you reject this opportunity?' ,
1259+ placeholder : `E.g., Not interested in the tech stack, location doesn't work for me, compensation too low...` ,
1260+ } ) ;
12491261 } ) ;
12501262
12511263 it ( 'should create opportunity with keywords and render markdown content' , async ( ) => {
0 commit comments