@@ -19,6 +19,7 @@ describe('plugin:cache', function() {
19
19
{ id :0 , fid :0 , name :'name0' , slug :'slug0' , starred :false , desc :'<pre></pre>' , likes :'1' , dislikes :'1' , category :'algorithms' } ,
20
20
{ id :1 , fid :1 , name :'name1' , slug :'slug1' , starred :true , desc :'<pre></pre>' , likes :'1' , dislikes :'1' , category :'algorithms' }
21
21
] ;
22
+ const TRANSLATION_CONFIGS = { useEndpointTranslation :false } ;
22
23
const PROBLEM = { id :0 , fid :0 , slug :'slug0' , category :'algorithms' } ;
23
24
24
25
before ( function ( ) {
@@ -51,6 +52,7 @@ describe('plugin:cache', function() {
51
52
describe ( '#getProblems' , function ( ) {
52
53
it ( 'should getProblems w/ cache ok' , function ( done ) {
53
54
cache . set ( 'problems' , PROBLEMS ) ;
55
+ cache . set ( h . KEYS . translation , TRANSLATION_CONFIGS ) ;
54
56
55
57
plugin . getProblems ( false , function ( e , problems ) {
56
58
assert . equal ( e , null ) ;
@@ -84,6 +86,7 @@ describe('plugin:cache', function() {
84
86
describe ( '#getProblem' , function ( ) {
85
87
it ( 'should getProblem w/ cache ok' , function ( done ) {
86
88
cache . set ( 'problems' , PROBLEMS ) ;
89
+ cache . set ( h . KEYS . translation , TRANSLATION_CONFIGS ) ;
87
90
cache . set ( '0.slug0.algorithms' , PROBLEMS [ 0 ] ) ;
88
91
89
92
plugin . getProblem ( _ . clone ( PROBLEM ) , false , function ( e , problem ) {
@@ -135,6 +138,7 @@ describe('plugin:cache', function() {
135
138
describe ( '#updateProblem' , function ( ) {
136
139
it ( 'should updateProblem ok' , function ( done ) {
137
140
cache . set ( 'problems' , PROBLEMS ) ;
141
+ cache . set ( h . KEYS . translation , TRANSLATION_CONFIGS ) ;
138
142
139
143
const kv = { value :'value00' } ;
140
144
const ret = plugin . updateProblem ( PROBLEMS [ 0 ] , kv ) ;