1- const { describe, it, expect, request, db, locale, titleCheck , authCheck } = require ( '../base' ) ;
1+ const { describe, it, expect, request, db, locale, checks , authAsMod } = require ( '../base' ) ;
22
33describe ( '/lists' , ( ) => {
44 describe ( 'GET' , ( ) => {
@@ -12,7 +12,7 @@ describe('/lists', () => {
1212 it ( 'has the correct page title' , done => {
1313 test ( ) . end ( ( err , res ) => {
1414 expect ( res ) . to . be . html ;
15- titleCheck ( res , `All Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
15+ checks . title ( res , `All Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
1616 done ( ) ;
1717 } ) ;
1818 } ) ;
@@ -52,7 +52,7 @@ describe('/lists/new', () => {
5252 it ( 'has the correct page title' , done => {
5353 test ( ) . end ( ( err , res ) => {
5454 expect ( res ) . to . be . html ;
55- titleCheck ( res , `New Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
55+ checks . title ( res , `New Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
5656 done ( ) ;
5757 } ) ;
5858 } ) ;
@@ -96,7 +96,7 @@ describe('/lists/defunct', () => {
9696 it ( 'has the correct page title' , done => {
9797 test ( ) . end ( ( err , res ) => {
9898 expect ( res ) . to . be . html ;
99- titleCheck ( res , `Defunct Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
99+ checks . title ( res , `Defunct Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
100100 done ( ) ;
101101 } ) ;
102102 } ) ;
@@ -136,7 +136,7 @@ describe('/lists/hidden', () => {
136136 it ( 'has the correct page title' , done => {
137137 test ( ) . end ( ( err , res ) => {
138138 expect ( res ) . to . be . html ;
139- titleCheck ( res , `Hidden Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
139+ checks . title ( res , `Hidden Bot Lists - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
140140 done ( ) ;
141141 } ) ;
142142 } ) ;
@@ -176,7 +176,7 @@ describe('/lists/features', () => {
176176 it ( 'has the correct page title' , done => {
177177 test ( ) . end ( ( err , res ) => {
178178 expect ( res ) . to . be . html ;
179- titleCheck ( res , `All List Features - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
179+ checks . title ( res , `All List Features - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
180180 done ( ) ;
181181 } ) ;
182182 } ) ;
@@ -213,7 +213,7 @@ describe('/lists/features/:id', () => {
213213 it ( 'has the correct page title' , done => {
214214 test ( ) . end ( ( err , res ) => {
215215 expect ( res ) . to . be . html ;
216- titleCheck ( res , `Has Voting - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
216+ checks . title ( res , `Has Voting - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
217217 done ( ) ;
218218 } ) ;
219219 } ) ;
@@ -263,7 +263,7 @@ describe('/lists/search', () => {
263263 it ( 'has the correct page title' , done => {
264264 test ( ) . end ( ( err , res ) => {
265265 expect ( res ) . to . be . html ;
266- titleCheck ( res , `Bot List Search - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
266+ checks . title ( res , `Bot List Search - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
267267 done ( ) ;
268268 } ) ;
269269 } ) ;
@@ -301,7 +301,7 @@ describe('/lists/search/:query', () => {
301301 it ( 'has the correct page title' , done => {
302302 test ( ) . end ( ( err , res ) => {
303303 expect ( res ) . to . be . html ;
304- titleCheck ( res , `Bot List Search - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
304+ checks . title ( res , `Bot List Search - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
305305 done ( ) ;
306306 } ) ;
307307 } ) ;
@@ -360,7 +360,7 @@ describe('/lists/:id', () => {
360360 it ( 'has the correct page title' , done => {
361361 test ( ) . end ( ( err , res ) => {
362362 expect ( res ) . to . be . html ;
363- titleCheck ( res , `${ data . name } (${ data . id } ) - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
363+ checks . title ( res , `${ data . name } (${ data . id } ) - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
364364 done ( ) ;
365365 } ) ;
366366 } ) ;
@@ -445,7 +445,7 @@ describe('/lists/:id', () => {
445445 test ( ) . end ( ( err , res ) => {
446446 expect ( res ) . to . have . status ( 200 ) ;
447447 expect ( res ) . to . be . html ;
448- titleCheck ( res , `${ data . name } (${ data . id } ) - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
448+ checks . title ( res , `${ data . name } (${ data . id } ) - ${ locale ( 'site_name' ) } - ${ locale ( 'short_desc' ) } ` ) ;
449449 done ( ) ;
450450 } ) ;
451451 } ) ;
@@ -482,7 +482,7 @@ describe('/lists/:id/edit', () => {
482482 } ) ;
483483 it ( 'renders the authentication required message' , done => {
484484 test ( ) . end ( ( err , res ) => {
485- authCheck ( res ) ;
485+ checks . authRequired ( res ) ;
486486 done ( ) ;
487487 } ) ;
488488 } ) ;
@@ -498,7 +498,7 @@ describe('/lists/:id/edit', () => {
498498 } ) ;
499499 it ( 'renders the authentication required message' , done => {
500500 test ( ) . end ( ( err , res ) => {
501- authCheck ( res ) ;
501+ checks . authRequired ( res ) ;
502502 done ( ) ;
503503 } ) ;
504504 } ) ;
@@ -517,7 +517,7 @@ describe('/lists/:id/icon', () => {
517517 } ) ;
518518 it ( 'renders the authentication required message' , done => {
519519 test ( ) . end ( ( err , res ) => {
520- authCheck ( res ) ;
520+ checks . authRequired ( res ) ;
521521 done ( ) ;
522522 } ) ;
523523 } ) ;
@@ -535,7 +535,7 @@ describe('/lists/add', () => {
535535 } ) ;
536536 it ( 'renders the authentication required message' , done => {
537537 test ( ) . end ( ( err , res ) => {
538- authCheck ( res ) ;
538+ checks . authRequired ( res ) ;
539539 done ( ) ;
540540 } ) ;
541541 } ) ;
@@ -551,7 +551,7 @@ describe('/lists/add', () => {
551551 } ) ;
552552 it ( 'renders the authentication required message' , done => {
553553 test ( ) . end ( ( err , res ) => {
554- authCheck ( res ) ;
554+ checks . authRequired ( res ) ;
555555 done ( ) ;
556556 } ) ;
557557 } ) ;
@@ -569,7 +569,7 @@ describe('/lists/legacy-ids', () => {
569569 } ) ;
570570 it ( 'renders the authentication required message' , done => {
571571 test ( ) . end ( ( err , res ) => {
572- authCheck ( res ) ;
572+ checks . authRequired ( res ) ;
573573 done ( ) ;
574574 } ) ;
575575 } ) ;
@@ -585,7 +585,7 @@ describe('/lists/legacy-ids', () => {
585585 } ) ;
586586 it ( 'renders the authentication required message' , done => {
587587 test ( ) . end ( ( err , res ) => {
588- authCheck ( res ) ;
588+ checks . authRequired ( res ) ;
589589 done ( ) ;
590590 } ) ;
591591 } ) ;
@@ -603,7 +603,7 @@ describe('/lists/features/manage', () => {
603603 } ) ;
604604 it ( 'renders the authentication required message' , done => {
605605 test ( ) . end ( ( err , res ) => {
606- authCheck ( res ) ;
606+ checks . authRequired ( res ) ;
607607 done ( ) ;
608608 } ) ;
609609 } ) ;
@@ -621,7 +621,7 @@ describe('/lists/features/manage/add', () => {
621621 } ) ;
622622 it ( 'renders the authentication required message' , done => {
623623 test ( ) . end ( ( err , res ) => {
624- authCheck ( res ) ;
624+ checks . authRequired ( res ) ;
625625 done ( ) ;
626626 } ) ;
627627 } ) ;
@@ -637,7 +637,7 @@ describe('/lists/features/manage/add', () => {
637637 } ) ;
638638 it ( 'renders the authentication required message' , done => {
639639 test ( ) . end ( ( err , res ) => {
640- authCheck ( res ) ;
640+ checks . authRequired ( res ) ;
641641 done ( ) ;
642642 } ) ;
643643 } ) ;
@@ -655,7 +655,7 @@ describe('/lists/features/manage/:id', () => {
655655 } ) ;
656656 it ( 'renders the authentication required message' , done => {
657657 test ( ) . end ( ( err , res ) => {
658- authCheck ( res ) ;
658+ checks . authRequired ( res ) ;
659659 done ( ) ;
660660 } ) ;
661661 } ) ;
@@ -671,7 +671,7 @@ describe('/lists/features/manage/:id', () => {
671671 } ) ;
672672 it ( 'renders the authentication required message' , done => {
673673 test ( ) . end ( ( err , res ) => {
674- authCheck ( res ) ;
674+ checks . authRequired ( res ) ;
675675 done ( ) ;
676676 } ) ;
677677 } ) ;
@@ -689,7 +689,7 @@ describe('/lists/features/manage/:id/delete', () => {
689689 } ) ;
690690 it ( 'renders the authentication required message' , done => {
691691 test ( ) . end ( ( err , res ) => {
692- authCheck ( res ) ;
692+ checks . authRequired ( res ) ;
693693 done ( ) ;
694694 } ) ;
695695 } ) ;
0 commit comments