Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:javihernandez:GPII:Cloud4all:Pilots2013
nodejs-cookie-signature
index-test.js
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File index-test.js of Package nodejs-cookie-signature
/** * Module dependencies. */ var cookie = require('..'); describe('.sign(val, secret)', function(){ it('should sign the cookie', function(){ var val = cookie.sign('hello', 'tobiiscool'); val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); var val = cookie.sign('hello', 'luna'); val.should.not.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); }) }) describe('.unsign(val, secret)', function(){ it('should unsign the cookie', function(){ var val = cookie.sign('hello', 'tobiiscool'); cookie.unsign(val, 'tobiiscool').should.equal('hello'); cookie.unsign(val, 'luna').should.be.false; }) })
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor