mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Redirection fixes (#8592)
* fix(redirects): logic update * test(middlewares): redirects tests * fix(nconf): IS_PROD is boolean * fix(test): treat IS_PROD as Boolean here too * fix(test): apiUrl test copypasta
This commit is contained in:
@@ -30,16 +30,17 @@ export function generateChallenge (options = {}) {
|
||||
|
||||
export function generateRes (options = {}) {
|
||||
let defaultRes = {
|
||||
render: sandbox.stub(),
|
||||
send: sandbox.stub(),
|
||||
status: sandbox.stub().returnsThis(),
|
||||
sendStatus: sandbox.stub().returnsThis(),
|
||||
json: sandbox.stub(),
|
||||
locals: {
|
||||
user: generateUser(options.localsUser),
|
||||
group: generateGroup(options.localsGroup),
|
||||
},
|
||||
redirect: sandbox.stub(),
|
||||
render: sandbox.stub(),
|
||||
send: sandbox.stub(),
|
||||
sendStatus: sandbox.stub().returnsThis(),
|
||||
set: sandbox.stub(),
|
||||
status: sandbox.stub().returnsThis(),
|
||||
t (string) {
|
||||
return i18n.t(string);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user