We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3d99a4 commit bb84cf9Copy full SHA for bb84cf9
test/res.cookie.js
@@ -150,6 +150,22 @@ describe('res', function(){
150
})
151
152
153
+ describe('signed without secret', function(){
154
+ it('should throw an error', function(done){
155
+ var app = express();
156
+
157
+ app.use(cookieParser());
158
159
+ app.use(function(req, res){
160
+ res.cookie('name', 'tobi', { signed: true }).end();
161
+ });
162
163
+ request(app)
164
+ .get('/')
165
+ .expect(500, /secret\S+ required for signed cookies/, done);
166
+ })
167
168
169
describe('.signedCookie(name, string)', function(){
170
it('should set a signed cookie', function(done){
171
var app = express();
0 commit comments