mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-20 03:11:57 +01:00
test: fix test to check for Secure in cookie string if test runner domain is https
This commit is contained in:
@@ -639,7 +639,7 @@ describe('Controllers', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
assert.strictEqual(response.statusCode, 302);
|
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')}/`);
|
assert.strictEqual(response.headers.location, `${nconf.get('relative_path')}/`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user