@@ -19,6 +19,7 @@ describe('plugin:cache', function() {
1919 { id : 0 , fid : 0 , name : 'name0' , slug : 'slug0' , starred : false , desc : '<pre></pre>' , likes : '1' , dislikes : '1' , category : 'algorithms' } ,
2020 { id : 1 , fid : 1 , name : 'name1' , slug : 'slug1' , starred : true , desc : '<pre></pre>' , likes : '1' , dislikes : '1' , category : 'algorithms' }
2121 ] ;
22+ const TRANSLATION_CONFIGS = { useEndpointTranslation : false } ;
2223 const PROBLEM = { id : 0 , fid : 0 , slug : 'slug0' , category : 'algorithms' } ;
2324
2425 before ( function ( ) {
@@ -51,6 +52,7 @@ describe('plugin:cache', function() {
5152 describe ( '#getProblems' , function ( ) {
5253 it ( 'should getProblems w/ cache ok' , function ( done ) {
5354 cache . set ( 'problems' , PROBLEMS ) ;
55+ cache . set ( h . KEYS . translation , TRANSLATION_CONFIGS ) ;
5456
5557 plugin . getProblems ( false , function ( e , problems ) {
5658 assert . equal ( e , null ) ;
@@ -84,6 +86,7 @@ describe('plugin:cache', function() {
8486 describe ( '#getProblem' , function ( ) {
8587 it ( 'should getProblem w/ cache ok' , function ( done ) {
8688 cache . set ( 'problems' , PROBLEMS ) ;
89+ cache . set ( h . KEYS . translation , TRANSLATION_CONFIGS ) ;
8790 cache . set ( '0.slug0.algorithms' , PROBLEMS [ 0 ] ) ;
8891
8992 plugin . getProblem ( _ . clone ( PROBLEM ) , false , function ( e , problem ) {
@@ -135,6 +138,7 @@ describe('plugin:cache', function() {
135138 describe ( '#updateProblem' , function ( ) {
136139 it ( 'should updateProblem ok' , function ( done ) {
137140 cache . set ( 'problems' , PROBLEMS ) ;
141+ cache . set ( h . KEYS . translation , TRANSLATION_CONFIGS ) ;
138142
139143 const kv = { value : 'value00' } ;
140144 const ret = plugin . updateProblem ( PROBLEMS [ 0 ] , kv ) ;
0 commit comments