Sha256: 0e935936688ce37b3d2d021ff756d825677fda8c5f7bc1190fc5bc4e7e70d38f
Contents?: true
Size: 1.2 KB
Versions: 62
Compression:
Stored size: 1.2 KB
Contents
//= require workarea/core/modules/cookie (function () { 'use strict'; describe('WORKAREA.cookie', function () { describe('create', function () { it('creates a cookie with a given name and value', function () { WORKAREA.cookie.create('foo', 'bar', 7); expect(_.includes(document.cookie, 'foo=bar')).to.equal(true); }); }); describe('destroy', function () { it('destroys a cookie with a given name', function () { WORKAREA.cookie.create('foo', 'bar', 7); WORKAREA.cookie.destroy('foo'); expect(_.includes(document.cookie, 'foo=bar')).to.equal(false); }); }); describe('read', function () { it('reads the cookie', function () { document.cookie = 'foo=bar'; expect(WORKAREA.cookie.read('foo')).to.equal('bar'); }); it('reads a url with query params from the cookie', function() { document.cookie = 'baz=http://bat.com/?q=hello'; expect(WORKAREA.cookie.read('baz')).to.equal('http://bat.com/?q=hello'); }); }); }); }());
Version data entries
62 entries across 62 versions & 1 rubygems