@@ -1150,6 +1150,25 @@ describe('GET /sitemaps/archive-index.xml', () => {
11501150
11511151 expect ( res . text ) . not . toContain ( '/sources/nonexistent-source/best-of' ) ;
11521152 } ) ;
1153+
1154+ it ( 'should exclude squad sources from archive index' , async ( ) => {
1155+ await con . getRepository ( Archive ) . save ( [
1156+ {
1157+ ...archiveBase ,
1158+ scopeType : ArchiveScopeType . Source ,
1159+ scopeId : 'm' ,
1160+ periodType : ArchivePeriodType . Month ,
1161+ periodStart : new Date ( '2025-01-01T00:00:00.000Z' ) ,
1162+ createdAt : new Date ( ) ,
1163+ } ,
1164+ ] ) ;
1165+
1166+ const res = await request ( app . server )
1167+ . get ( '/sitemaps/archive-index.xml' )
1168+ . expect ( 200 ) ;
1169+
1170+ expect ( res . text ) . not . toContain ( '/sources/moderatedSquad/best-of' ) ;
1171+ } ) ;
11531172} ) ;
11541173
11551174describe ( 'GET /sitemaps/archive-pages-:scopeType-:periodType-:page.xml' , ( ) => {
@@ -1303,6 +1322,25 @@ describe('GET /sitemaps/archive-pages-:scopeType-:periodType-:page.xml', () => {
13031322
13041323 expect ( res . text ) . not . toContain ( '/sources/nonexistent-source/best-of' ) ;
13051324 } ) ;
1325+
1326+ it ( 'should exclude squad sources from archive pages' , async ( ) => {
1327+ await con . getRepository ( Archive ) . save ( [
1328+ {
1329+ ...archiveBase ,
1330+ scopeType : ArchiveScopeType . Source ,
1331+ scopeId : 'm' ,
1332+ periodType : ArchivePeriodType . Month ,
1333+ periodStart : new Date ( '2025-01-01T00:00:00.000Z' ) ,
1334+ createdAt : new Date ( ) ,
1335+ } ,
1336+ ] ) ;
1337+
1338+ const res = await request ( app . server )
1339+ . get ( '/sitemaps/archive-pages-source-month-0.xml' )
1340+ . expect ( 200 ) ;
1341+
1342+ expect ( res . text ) . not . toContain ( '/sources/moderatedSquad/best-of' ) ;
1343+ } ) ;
13061344} ) ;
13071345
13081346describe ( 'GET /sitemaps/index.xml (archive entries)' , ( ) => {
0 commit comments