test: fix test to check for Secure in cookie string if test runner domain is https

This commit is contained in:
Julian Lam
2026-01-07 13:28:17 -05:00
parent 47074b3c93
commit 5954015ed7

View File

@@ -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')}/`);
});