@ Test public void outdated_scenario ( ) throws JSONException { httpPost ( "keys" , jsonKey . toString ( ) , 201 ) ; try { // Add two outdated translations sendTranslationUpdate ( "zztranslation" , EN , true ) ; sendTranslationUpdate ( "translation" , FR , true ) ; // Update the default translation jsonKey . put ( "translation" , "updated translation" ) ; httpPut ( "keys/" + keyName , jsonKey . toString ( ) , 200 ) ; // The key should remain outdated assertOutdatedStatus ( true ) ; // Update English translations sendTranslationUpdate ( "updated translation" , EN , false ) ; // The key should remain outdated assertOutdatedStatus ( true ) ; // Update French translations sendTranslationUpdate ( "updated translation" , FR , false ) ; // Now, all the translation have been updated assertOutdatedStatus ( false ) ; } finally { // clean the repo httpDelete ( "keys/" + keyName , 204 ) ; } }
Checks the outdated scenario . 1 ) A key is added 2 ) Add fr translation 3 ) Update default translation = > key become outdated 4 ) Update en translation = > key is still outdated 5 ) Update fr translation = > key is no longer outdated