3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
7 Ext.test.session.addTest( 'Ext.util', {
15 test_encode: function() {
16 Y.Assert.areEqual( '{"foo":"bar"}', Ext.util.JSON.encode( { foo: 'bar' } ), 'Test encode with simple object' );
21 test_decode: function() {
22 Y.ObjectAssert.hasKeys({
24 }, Ext.util.JSON.decode( '{"foo":"bar"}' ), 'Test decode with a simple object');
25 Y.ObjectAssert.hasKeys({
27 }, Ext.util.JSON.decode( '{"foo":["bar","baz"]}' ), 'Test decode with a hash + array');