Permalink
Browse files

Tests: With the change for the state saving into localStorage we need…

… to update the state destroy in the unit tests
  • Loading branch information...
1 parent 94f0647 commit 46d483d0558439fa801d6d062d6e07dede86b33b @DataTables committed Oct 31, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 media/unit_testing/unit_test.js
@@ -111,11 +111,9 @@ var oTest = {
*/
"fnCookieDestroy": function ( oTable )
{
- var sName = oTable.fnSettings().sCookiePrefix+oTable.fnSettings().sInstance;
- var aParts = window.location.pathname.split('/');
- var sNameFile = sName + '_' + aParts.pop().replace(/[\/:]/g,"").toLowerCase();
- document.cookie = sNameFile+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
- aParts.join('/') + "/";
+ var s = oTable.fnSettings();
+
+ localStorage.setItem( 'DataTables_'+s.sInstance+'_'+window.location.pathname, null );
},

0 comments on commit 46d483d

Please sign in to comment.