Sha256: 165b78707127db55d4a6eab7bd05d20b97592b7924f79aa592d2100677213a82
Contents?: true
Size: 735 Bytes
Versions: 19
Compression:
Stored size: 735 Bytes
Contents
var Cookie = require('../index') , 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
19 entries across 19 versions & 1 rubygems