ObjectAssert = Y.ObjectAssert;
//utility function
}
}
//-------------------------------------------------------------------------
// Base Test Suite
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Test Case for parsing capabilities
//-------------------------------------------------------------------------
name : "Cookie Parsing Tests",
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testParseCookieStringEmpty : function(){
},
testParseCookieStringNull : function(){
},
testParseCookieStringBoolean : function(){
},
testParseCookieStringBoolean : function(){
},
testParseCookieStringUndefined : function(){
},
testParseCookieStringInvalid : function(){
},
testParseCookieStringSimple : function(){
var cookieString = "a=b";
},
testParseCookieStringNumber : function(){
var cookieString = "12345=b";
},
testParseCookieStringSimpleMulti : function(){
var cookieString = "a=b; c=d; e=f; g=h";
},
testParseCookieStringComplex : function(){
var cookieString = "name=Nicholas%20Zakas; title=front%20end%20engineer";
Assert.areEqual("Nicholas Zakas", cookies.name, "Cookie 'name' should have value 'Nicholas Zakas'.");
Assert.areEqual("front end engineer", cookies.title, "Cookie 'title' should have value 'front end engineer'.");
},
testParseCookieStringNetwork : function(){
var cookieString = "B=2nk0a3t3lj7cr&b=3&s=13; LYC=l_v=2&l_lv=10&l_l=94ddoa70d&l_s=qz54t4qwrsqquyv51w0z4xxwtx31x1t0&l_lid=146p1u6&l_r=4q&l_lc=0_0_0_0_0&l_mpr=50_0_0&l_um=0_0_1_0_0;YMRAD=1215072198*0_0_7318647_1_0_40123839_1; l%5FPD3=840";
},
var cookieName = "something[1]";
var cookieValue = "123";
Assert.areEqual(cookieValue, cookies[cookieName], "Cookie value for '" + cookieName + "' is wrong.");
},
testParseCookieStringIncorrectFormat: function(){
var cookieString = "SESSION=27bedbdf3d35252d0db07f34d81dcca6; STATS=OK; SCREEN=1280x1024; undefined; ys-bottom-preview=o%3Aheight%3Dn%253A389";
},
/*
* Tests that the cookie utility deals with cookies that contain
* an invalid encoding. It shouldn't error, but should treat the cookie
* as if it doesn't exist (return null).
*/
testParseCookieStringInvalidEncoding: function(){
var cookieString = "DetailInfoList=CPN03022194=@|@=CPN03#|#%B4%EB%C3%B5%C7%D8%BC%F6%BF%E5%C0%E5#|#1016026000#|#%BD%C5%C8%E6%B5%BF#|##|#";
},
/*
* Tests that a Boolean cookie, one without an equals sign of value,
* is represented as an empty string.
*/
testParseCookieStringBooleanCookie: function(){
var cookieString = "info";
},
testParseCookieStringWithHash : function(){
var cookieString = "name=Nicholas%20Zakas; hash=a=b&c=d&e=f&g=h; title=front%20end%20engineer";
Assert.areEqual("Nicholas Zakas", cookies.name, "Cookie 'name' should have value 'Nicholas Zakas'.");
Assert.areEqual("a=b&c=d&e=f&g=h", cookies.hash, "Cookie 'hash' should have value 'a=b&c=d&e=f&g=h'.");
Assert.areEqual("front end engineer", cookies.title, "Cookie 'title' should have value 'front end engineer'.");
},
testParseCookieHash : function () {
var cookieHash = "a=b&c=d&e=f&g=h";
},
testParseCookieHashComplex : function () {
var cookieName = "something[1]";
var cookieValue = "123";
},
testParseCookieHashEmpty: function(){
}
}));
//-------------------------------------------------------------------------
// Test Case for string formatting capabilities
//-------------------------------------------------------------------------
name : "Cookie String Creation Tests",
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testCreateCookieStringSimple : function(){
},
testCreateCookieStringSimpleWithPath : function(){
},
testCreateCookieStringSimpleWithInvalidPath1 : function(){
},
testCreateCookieStringSimpleWithInvalidPath2 : function(){
},
testCreateCookieStringSimpleWithDomain : function(){
},
testCreateCookieStringSimpleWithInvalidDomain1 : function(){
},
testCreateCookieStringSimpleWithInvalidDomain2 : function(){
},
testCreateCookieStringSimpleWithSecure : function(){
},
testCreateCookieStringSimpleWithInvalidSecure1 : function(){
},
testCreateCookieStringSimpleWithInvalidSecure2 : function(){
},
testCreateCookieStringSimpleWithExpiry : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
Assert.areEqual("name=value; expires=" + expires.toUTCString(), text, "Cookie string is incorrect.");
},
testCreateCookieStringSimpleWithInvalidExpiry : function(){
},
testCreateCookieStringSimpleWithAll : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
var text = Y.Cookie._createCookieString("name", "value", true, { expires: expires, domain : "yahoo.com", path: "/", secure: true });
Assert.areEqual("name=value; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", text, "Cookie string is incorrect.");
},
testCreateCookieStringComplex : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
Assert.areEqual(encodeURIComponent(name) + "=" + encodeURIComponent(value), text, "Cookie string is incorrect.");
},
testCreateCookieStringComplexWithPath : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
Assert.areEqual(encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; path=/", text, "Cookie string is incorrect.");
},
testCreateCookieStringComplexWithDomain : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
Assert.areEqual(encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; domain=yahoo.com", text, "Cookie string is incorrect.");
},
testCreateCookieStringComplexWithSecure : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
Assert.areEqual(encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; secure", text, "Cookie string is incorrect.");
},
testCreateCookieStringComplexWithExpiry : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
Assert.areEqual(encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; expires=" + expires.toUTCString(), text, "Cookie string is incorrect.");
},
testCreateCookieStringComplexWithAll : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
var text = Y.Cookie._createCookieString(name, value, true, { expires: expires, domain : "yahoo.com", path: "/", secure: true });
Assert.areEqual(encodeURIComponent(name) + "=" + encodeURIComponent(value) + "; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", text, "Cookie string is incorrect.");
},
testCreateCookieHashString1 : function (){
var hash = {
name: "Nicholas Zakas",
title: "Front End Engineer",
"something else" : "hiya"
};
Assert.areEqual("name=Nicholas%20Zakas&title=Front%20End%20Engineer&something%20else=hiya", text, "Cookie hash string is incorrect.");
},
testCreateCookieHashString2 : function (){
var hash = {
name: "Nicholas Zakas"
};
}
}));
//-------------------------------------------------------------------------
// Test Case for getting cookies
//-------------------------------------------------------------------------
name : "Get Cookie Tests",
_should : {
error : {
}
},
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testGetSimple : function(){
},
testGetUnknown : function(){
},
testGetComplex : function(){
this.stubDoc.cookie = "name=Nicholas%20Zakas; title=Front%20End%20Engineer; component=Cookie%20Utility";
},
testGetInvalidName1 : function(){
},
testGetInvalidName2 : function(){
},
testGetInvalidName3 : function(){
},
testGetInvalidName4 : function(){
},
testGetInvalidName5 : function(){
},
testGetWithBooleanConverter : function(){
},
testGetWithNumberConverter : function(){
},
testGetWithCustomConverter : function(){
if (value === "11"){
return true;
} else {
return false;
}
});
},
testGetWithInvalidConverter : function(){
},
testGetWithConverterAndUnknownCookie : function(){
},
testGetWithBooleanConverterOption : function(){
},
testGetWithNumberConverterOption : function(){
},
testGetWithCustomConverterOption : function(){
if (value === "11"){
return true;
} else {
return false;
}
} });
},
testGetWithInvalidConverterOption : function(){
},
testGetWithConverterOptionAndUnknownCookie : function(){
},
testGetWithEmptyOptions : function(){
},
testGetSimpleWithFalseRaw : function(){
},
testGetSimpleWithTrueRaw : function(){
},
testGetComplexWithFalseRaw : function(){
Assert.areEqual("as.bd ed|ieh,~!!@#$%^*=098345|}{<>?", value, "Retrieved cookie value is incorrect.");
},
testGetComplexWithTrueRaw : function(){
this.stubDoc.cookie = "name=as.bd ed|ieh,~!!@#$%^*=098345|}{<>?; name2=" + encodeURIComponent("as.bd ed|ieh,~!!@#$%^*=098345|}{<>?");
Assert.areEqual("as.bd ed|ieh,~!!@#$%^*=098345|}{<>?", value, "Retrieved cookie value is incorrect.");
Assert.areEqual(encodeURIComponent("as.bd ed|ieh,~!!@#$%^*=098345|}{<>?"), value2, "Retrieved cookie value is incorrect.");
}
}));
//-------------------------------------------------------------------------
// Test Case for testing cookie existence
//-------------------------------------------------------------------------
name : "Cookie Exists Tests",
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testExistsSimple : function(){
},
testExistsUnknown : function(){
},
testExistsBooleanCookie : function(){
}
}));
//-------------------------------------------------------------------------
// Test Case for getting cookie hashes
//-------------------------------------------------------------------------
name : "Get Cookie Subs Tests",
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testGetSubsSimple : function(){
},
testGetSubsUnknown : function(){
},
testGetSubsComplex : function(){
this.stubDoc.cookie = "name=Nicholas&20Zakas; data=age=29&title=f2e&stuff=no%20way; component=Cookie%20Utility";
}
}));
//-------------------------------------------------------------------------
// Test Case for getting individual cookie sub.
//-------------------------------------------------------------------------
name : "Get Cookie Sub Tests",
_should : {
error : {
}
},
setUp: function(){
this.stubDoc = {cookie:"data=" + "a=b&c=d&e=f&g=h&found=true&count=11&age=29&title=f2e&stuff=no%20way&special=" + encodeURIComponent("Something with & and =") +"; name=Nicholas%20Zakas; component=Cookie%20Utility" };
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testGetSubSimple : function(){
},
testGetSubUnknown : function(){
},
testGetSubComplex : function(){
},
testGetSubInvalidName1 : function(){
},
testGetSubInvalidName2 : function(){
},
testGetSubInvalidName3 : function(){
},
testGetSubInvalidName4 : function(){
},
testGetSubInvalidName5 : function(){
},
testGetSubInvalidSubName1 : function(){
},
testGetSubInvalidSubName2 : function(){
},
testGetSubInvalidSubName3 : function(){
},
testGetSubInvalidSubName4 : function(){
},
testGetSubInvalidSubName5 : function(){
},
testGetSubOnNonExistantCookie : function(){
},
testGetSubWithBooleanConverter : function(){
},
testGetSubWithNumberConverter : function(){
},
testGetSubWithCustomConverter : function(){
if (value === "11"){
return true;
} else {
return false;
}
});
},
testGetSubWithInvalidConverter : function(){
},
testSubGetWithConverterAndUnknownCookie : function(){
},
testSubGetSpecial : function(){
}
}));
//-------------------------------------------------------------------------
// Test Case for removing individual cookie sub.
//-------------------------------------------------------------------------
name : "Remove Cookie Sub Tests",
_should : {
error : {
}
},
setUp: function(){
this.stubDoc = {cookie:"data=" + "a=b&c=d&e=f&g=h&found=true&count=11&age=29&title=f2e&stuff=no%20way&special=" + encodeURIComponent("Something with & and =") +"; name=Nicholas%20Zakas; component=Cookie%20Utility; info=a=b" };
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testRemoveSubSimple : function(){
Assert.areEqual("data=a=b&e=f&g=h&found=true&count=11&age=29&title=f2e&stuff=no%20way&special=" + encodeURIComponent("Something with & and ="), value, "Cookie string is incorrect.");
},
testRemoveSubUnknown : function(){
},
testRemoveSubInvalidName1 : function(){
},
testRemoveSubInvalidName2 : function(){
},
testRemoveSubInvalidName3 : function(){
},
testRemoveSubInvalidName4 : function(){
},
testRemoveSubInvalidName5 : function(){
},
testRemoveSubInvalidSubName1 : function(){
},
testRemoveSubInvalidSubName2 : function(){
},
testRemoveSubInvalidSubName3 : function(){
},
testRemoveSubInvalidSubName4 : function(){
},
testRemoveSubInvalidSubName5 : function(){
},
testRemoveSubOnNonExistantCookie : function(){
},
testRemoveLastSub : function(){
},
testRemoveLastSubWithTrueRemoveIfEmpty : function(){
"The 'info' cookie should be removed.");
//var value = Y.Cookie.get("info");
//Assert.isNull(value, "Cookie value should be null.");
},
testRemoveLastSubWithFalseRemoveIfEmpty : function() {
},
testRemoveNotLastSubWithTrueRemoveIfEmpty : function(){
Assert.areEqual("data=a=b&e=f&g=h&found=true&count=11&age=29&title=f2e&stuff=no%20way&special=" + encodeURIComponent("Something with & and ="), value, "Cookie string is incorrect.");
},
testRemoveNotLastSubWithFalseRemoveIfEmpty : function() {
Assert.areEqual("data=a=b&e=f&g=h&found=true&count=11&age=29&title=f2e&stuff=no%20way&special=" + encodeURIComponent("Something with & and ="), value, "Cookie string is incorrect.");
},
testRemoveNotLastSubWithInvalidRemoveIfEmpty : function() {
Assert.areEqual("data=a=b&e=f&g=h&found=true&count=11&age=29&title=f2e&stuff=no%20way&special=" + encodeURIComponent("Something with & and ="), value, "Cookie string is incorrect.");
}
}));
//-------------------------------------------------------------------------
// Test Case for removing cookies
//-------------------------------------------------------------------------
name : "Remove Cookie Tests",
_should : {
error : {
}
},
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testRemoveSimple : function(){
Assert.areEqual("data=; expires=" + (new Date(0)).toUTCString(), this.stubDoc.cookie, "The 'data' cookie should be removed.");
},
/*
* These next five tests pass because they throw an error.
*/
testRemoveInvalidName1 : function(){
},
testRemoveInvalidName2 : function(){
},
testRemoveInvalidName3 : function(){
},
testRemoveInvalidName4 : function(){
},
testRemoveInvalidName5 : function(){
},
/*
* Tests that remove() doesn't change the options object that was passed in.
*/
testRemoveWithOptionsIntact: function(){
var options = {};
}
}));
//-------------------------------------------------------------------------
// Test Case for setting cookies
//-------------------------------------------------------------------------
name : "Set Cookie Tests",
_should : {
error : {
}
},
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testSetSimple : function(){
},
testSetSimpleWithFalseRaw : function(){
},
testSetSimpleWithTrueRaw : function(){
},
testSetSimpleWithInvalidRaw : function(){
},
testSetSimpleWithPath : function(){
},
testSetSimpleWithInvalidPath1 : function(){
},
testSetSimpleWithInvalidPath2 : function(){
},
testSetSimpleWithDomain : function(){
Assert.areEqual("name=value; domain=yahoo.com", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSimpleWithInvalidDomain1 : function(){
},
testSetSimpleWithInvalidDomain2 : function(){
//won't work unless the page is loaded from that domain
//Assert.areEqual("name=value", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSimpleWithSecure : function(){
},
testSetSimpleWithInvalidSecure1 : function(){
},
testSetSimpleWithInvalidSecure2 : function(){
},
testSetSimpleWithExpiry : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
Assert.areEqual("name=value; expires=" + expires.toUTCString(), text, "Cookie string is incorrect.");
Assert.areEqual("name=value; expires=" + expires.toUTCString(), this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSimpleWithInvalidExpiry : function(){
},
testSetSimpleWithAll : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
var text = Y.Cookie.set("name", "value", { expires: expires, domain : "yahoo.com", path: "/", secure: true });
Assert.areEqual("name=value; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", text, "Cookie string is incorrect.");
Assert.areEqual("name=value; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetComplex : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
},
testSetComplexWithFalseRaw : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
},
testSetComplexWithTrueRaw : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
},
testSetComplexWithPath : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
},
testSetComplexWithDomain : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
Assert.areEqual(result + "; domain=yahoo.com", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetComplexWithSecure : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
},
testSetComplexWithExpiry : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
Assert.areEqual(result + "; expires=" + expires.toUTCString(), text, "Cookie string is incorrect.");
Assert.areEqual(result + "; expires=" + expires.toUTCString(), this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetComplexWithAll : function(){
var name = "c.f name";
var value = "as.bd ed|ieh,~!!@#$%^*=098345|}{<>?";
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
var text = Y.Cookie.set(name, value, { expires: expires, domain : "yahoo.com", path: "/", secure: true });
Assert.areEqual(result + "; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", text, "Cookie string is incorrect.");
Assert.areEqual(result + "; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", this.stubDoc.cookie, "Cookie was not set to document.");
}
}));
//-------------------------------------------------------------------------
// Test Case for setting subcookies
//-------------------------------------------------------------------------
name : "Set Subcookie Tests",
_should : {
error : {
}
},
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testSetSubSimple : function(){
},
testSetSubSimpleWithPath : function(){
},
testSetSubSimpleWithInvalidPath1 : function(){
},
testSetSubSimpleWithInvalidPath2 : function(){
},
testSetSubSimpleWithDomain : function(){
Assert.areEqual("name=sub=value; domain=yahoo.com", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubSimpleWithInvalidDomain1 : function(){
},
testSetSubSimpleWithInvalidDomain2 : function(){
},
testSetSubSimpleWithSecure : function(){
},
testSetSubSimpleWithInvalidSecure1 : function(){
},
testSetSubSimpleWithInvalidSecure2 : function(){
},
testSetSubSimpleWithExpiry : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
Assert.areEqual("name=sub=value; expires=" + expires.toUTCString(), text, "Cookie string is incorrect.");
Assert.areEqual("name=sub=value; expires=" + expires.toUTCString(), this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubSimpleWithInvalidExpiry : function(){
},
testSetSubSimpleWithAll : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
var text = Y.Cookie.setSub("name", "sub", "value", { expires: expires, domain : "yahoo.com", path: "/", secure: true });
Assert.areEqual("name=sub=value; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", text, "Cookie string is incorrect.");
Assert.areEqual("name=sub=value; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubSpecial : function(){
var value = "Something with & and =";
Assert.areEqual("name=sub=" + encodeURIComponent(value), cookieText, "Sub cookie string is incorrect.");
}
}));
//-------------------------------------------------------------------------
// Test Case for setting complete subcookies
//-------------------------------------------------------------------------
name : "Set Complete Subcookie Tests",
_should : {
error : {
}
},
setUp: function(){
},
tearDown: function(){
delete this.stubDoc;
},
//---------------------------------------------------------------------
// Tests
//---------------------------------------------------------------------
testSetSubsSimple : function(){
},
testSetSubsSimpleWithPath : function(){
Assert.areEqual("data=a=b&c=d&e=f&g=h; path=/", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubsSimpleWithInvalidPath1 : function(){
},
testSetSubsSimpleWithInvalidPath2 : function(){
},
testSetSubsSimpleWithDomain : function(){
Assert.areEqual("data=a=b&c=d&e=f&g=h; domain=yahoo.com", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubsSimpleWithInvalidDomain1 : function(){
},
testSetSubsSimpleWithInvalidDomain2 : function(){
},
testSetSubsSimpleWithSecure : function(){
Assert.areEqual("data=a=b&c=d&e=f&g=h; secure", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubsSimpleWithInvalidSecure1 : function(){
},
testSetSubsSimpleWithInvalidSecure2 : function(){
},
testSetSubsSimpleWithExpiry : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
Assert.areEqual("data=a=b&c=d&e=f&g=h; expires=" + expires.toUTCString(), text, "Cookie string is incorrect.");
Assert.areEqual("data=a=b&c=d&e=f&g=h; expires=" + expires.toUTCString(), this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubsSimpleWithInvalidExpiry : function(){
},
testSetSubsSimpleWithAll : function(){
var expires = new Date("Wed, 01 Jan 2070 00:00:00 GMT");
var text = Y.Cookie.setSubs("data", {a: "b",c: "d",e: "f",g: "h"}, { expires: expires, domain : "yahoo.com", path: "/", secure: true });
Assert.areEqual("data=a=b&c=d&e=f&g=h; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", text, "Cookie string is incorrect.");
Assert.areEqual("data=a=b&c=d&e=f&g=h; expires=" + expires.toUTCString() + "; path=/; domain=yahoo.com; secure", this.stubDoc.cookie, "Cookie was not set to document.");
},
testSetSubsValues : function(){
//try to get the values
}
}));
});