Tweak cookie set failure message and add spec
This commit is contained in:
parent
2cf0843f82
commit
8c52279531
2 changed files with 12 additions and 1 deletions
|
@ -69,6 +69,17 @@ describe('session module', function () {
|
|||
})
|
||||
})
|
||||
|
||||
it('calls back with an error when setting a cookie with missing required fields', function (done) {
|
||||
session.defaultSession.cookies.set({
|
||||
url: '',
|
||||
name: '1',
|
||||
value: '1'
|
||||
}, function (error) {
|
||||
assert.equal(error.message, 'Setting cookie failed')
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should over-write the existent cookie', function (done) {
|
||||
session.defaultSession.cookies.set({
|
||||
url: url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue