@@ -15,7 +15,6 @@ import {
1515 ArticlePost ,
1616 Bookmark ,
1717 BookmarkList ,
18- BRIEFING_SOURCE ,
1918 clearPostTranslations ,
2019 Comment ,
2120 Feed ,
@@ -104,7 +103,6 @@ import { Product, ProductType } from '../src/entity/Product';
104103import { BriefingModel , BriefingType } from '../src/integrations/feed' ;
105104import { UserBriefingRequest } from '@dailydotdev/schema' ;
106105import { addDays } from 'date-fns' ;
107- import { BriefPost } from '../src/entity/posts/BriefPost' ;
108106
109107jest . mock ( '../src/common/pubsub' , ( ) => ( {
110108 ...( jest . requireActual ( '../src/common/pubsub' ) as Record < string , unknown > ) ,
@@ -1245,54 +1243,6 @@ describe('query post', () => {
12451243 ) ;
12461244 } ) ;
12471245
1248- it ( 'should throw when brief post is from other user' , async ( ) => {
1249- loggedUser = '1' ;
1250-
1251- await saveFixtures ( con , BriefPost , [
1252- {
1253- id : 'pbriefanotherauthor' ,
1254- shortId : 'pbfaa' ,
1255- title : 'pbriefanotherauthor' ,
1256- score : 0 ,
1257- sourceId : BRIEFING_SOURCE ,
1258- createdAt : new Date ( '2021-09-22T07:15:51.247Z' ) ,
1259- private : true ,
1260- visible : true ,
1261- authorId : '2' ,
1262- } ,
1263- ] ) ;
1264-
1265- return testQueryErrorCode (
1266- client ,
1267- { query : QUERY ( 'pbriefanotherauthor' ) } ,
1268- 'FORBIDDEN' ,
1269- ) ;
1270- } ) ;
1271-
1272- it ( 'should throw for anonymous user accessing brief' , async ( ) => {
1273- loggedUser = null ;
1274-
1275- await saveFixtures ( con , BriefPost , [
1276- {
1277- id : 'pbriefanotherauthor' ,
1278- shortId : 'pbfaa' ,
1279- title : 'pbriefanotherauthor' ,
1280- score : 0 ,
1281- sourceId : BRIEFING_SOURCE ,
1282- createdAt : new Date ( '2021-09-22T07:15:51.247Z' ) ,
1283- private : true ,
1284- visible : true ,
1285- authorId : '2' ,
1286- } ,
1287- ] ) ;
1288-
1289- return testQueryErrorCode (
1290- client ,
1291- { query : QUERY ( 'pbriefanotherauthor' ) } ,
1292- 'FORBIDDEN' ,
1293- ) ;
1294- } ) ;
1295-
12961246 describe ( 'clickbaitTitleDetected' , ( ) => {
12971247 const LOCAL_QUERY = /* GraphQL */ `
12981248 query Post($id: ID!) {
0 commit comments