From 5954015ed741b660c4eefb8adcc2250346e02dbe Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 7 Jan 2026 13:28:17 -0500 Subject: [PATCH] test: fix test to check for Secure in cookie string if test runner domain is https --- test/controllers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllers.js b/test/controllers.js index d79cf6de04..62a28c1080 100644 --- a/test/controllers.js +++ b/test/controllers.js @@ -639,7 +639,7 @@ describe('Controllers', () => { }); assert.strictEqual(response.statusCode, 302); - assert.strictEqual(response.headers['set-cookie'], `express.sid=; Path=${nconf.get('relative_path') || '/'}; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax`); + assert.strictEqual(response.headers['set-cookie'], `express.sid=; Path=${nconf.get('relative_path') || '/'}; Expires=Thu, 01 Jan 1970 00:00:00 GMT${nconf.get('secure') ? '; Secure' : ''}; SameSite=Lax`); assert.strictEqual(response.headers.location, `${nconf.get('relative_path')}/`); });