@@ -66,6 +66,36 @@ describe('Reaction pagination', () => {
6666 } ) ;
6767 } ) ;
6868
69+ describe ( '#withRankingVarsAsMap' , ( ) => {
70+ ctx . requestShouldNotError ( async ( ) => {
71+ ctx . response = await ctx . bob . feed ( 'user' , ctx . alice . userId ) . get ( {
72+ reactions : { score_vars : true } ,
73+ limit : 4 ,
74+ offset : 2 ,
75+ rankingVars : { popular : 1 , music : 4 } ,
76+ } ) ;
77+ } ) ;
78+ } ) ;
79+ describe ( '#withRankingVarsShouldErr' , ( ) => {
80+ ctx . requestShouldError ( 400 , async ( ) => {
81+ ctx . response = await ctx . bob . feed ( 'user' , ctx . alice . userId ) . get ( {
82+ reactions : { score_vars : true } ,
83+ limit : 4 ,
84+ offset : 2 ,
85+ rankingVars : [ 'popular' , 1 ] ,
86+ } ) ;
87+ } ) ;
88+ } ) ;
89+ describe ( '#withRankingVarsAsString' , ( ) => {
90+ ctx . requestShouldNotError ( async ( ) => {
91+ ctx . response = await ctx . bob . feed ( 'user' , ctx . alice . userId ) . get ( {
92+ reactions : { score_vars : true } ,
93+ limit : 4 ,
94+ offset : 2 ,
95+ rankingVars : '{"sports":1,"music":4}' ,
96+ } ) ;
97+ } ) ;
98+ } ) ;
6999 describe ( 'When bob reads alice her feed with all enrichment enabled' , ( ) => {
70100 ctx . requestShouldNotError ( async ( ) => {
71101 ctx . response = await ctx . bob . feed ( 'user' , ctx . alice . userId ) . get ( {
0 commit comments