File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 118118 json : true
119119 } , [ ] . slice . call ( arguments ) ) ;
120120 } ;
121- api . defaults = { } ;
121+ api . defaults = {
122+ path : '/'
123+ } ;
122124
123125 api . remove = function ( key , options ) {
124126 api ( key , '' , extend ( options , {
Original file line number Diff line number Diff line change @@ -162,7 +162,12 @@ test('return value', function () {
162162 strictEqual ( actual , expected , 'should return written cookie string' ) ;
163163} ) ;
164164
165- test ( 'defaults' , function ( ) {
165+ test ( 'default path attribute' , function ( ) {
166+ expect ( 1 ) ;
167+ ok ( Cookies . set ( 'c' , 'v' ) . match ( / p a t h = \/ / ) , 'should be default to the whole site' ) ;
168+ } ) ;
169+
170+ test ( 'changing defaults' , function ( ) {
166171 expect ( 2 ) ;
167172
168173 Cookies . defaults . path = '/foo' ;
You can’t perform that action at this time.
0 commit comments