Sha256: 7338c6bdf5ec137b98d95d2f67261e1cc62a61c18fa4a98b227c651c240e7e8d
Contents?: true
Size: 737 Bytes
Versions: 6
Compression:
Stored size: 737 Bytes
Contents
var Cookie = require('../vendor/cookie') , assert = require('assert'); var str = 'sid=s543qactge.wKE61E01Bs%2BKhzmxrwrnug; path=/; httpOnly; expires=Sat, 04 Dec 2010 23:27:28 GMT'; var cookie = new Cookie(str); // test .toString() assert.equal(cookie.toString(), str); // test .path assert.equal(cookie.path, '/'); // test .httpOnly assert.equal(cookie.httpOnly, true); // test .name assert.equal(cookie.name, 'sid'); // test .value assert.equal(cookie.value, 's543qactge.wKE61E01Bs%2BKhzmxrwrnug'); // test .expires assert.equal(cookie.expires instanceof Date, true); // test .path default var cookie = new Cookie('foo=bar', { url: 'http://foo.com/bar' }); assert.equal(cookie.path, '/bar'); console.log('All tests passed');
Version data entries
6 entries across 6 versions & 1 rubygems