Skip to content

Instantly share code, notes, and snippets.

@trmsmy
Created October 1, 2009 16:26
Show Gist options
  • Save trmsmy/199077 to your computer and use it in GitHub Desktop.
Save trmsmy/199077 to your computer and use it in GitHub Desktop.
describe("when user is auth'd", function() {
before(function() {
Screw.Stub.stub(window, "getPortalData").andReturn({guid: '067416251802022009comcast.usr4jr',zip:'19103',wid:'19103'});
console.log(' before in auth user describe ' + getPortalData().zip);
});
describe(" and when localstorage is not available", function() {
console.log(' before in auth user describe -- innner ' + getPortalData().zip);
Prefs.remove(AdTargetingConstant.ADT_ZIP, Prefs.ADS);
Prefs.remove(AdTargetingConstant.IS_LS_AVAILABLE, Prefs.ADS);
describe(" and when auht'd user has not opted out", function() {
//Screw.Stub.stub(service, "_isUserOptedOutInCloud").andReturn(false);
it("should return a valid zipcode from user's cookie", function(){
expect("19103").to(equal, '19103');
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment