Merge pull request #2643 from overleaf/jel-affiliations-cron-job
Ensure affiliations cron job GitOrigin-RevId: 4ac6f8b29b1e1460d627a86172fcdf1fa27a59a8
This commit is contained in:
@@ -604,10 +604,10 @@ describe('UserController', function() {
|
||||
})
|
||||
})
|
||||
|
||||
describe('ensureAffiliationsMiddleware', function() {
|
||||
describe('ensureAffiliationMiddleware', function() {
|
||||
describe('without affiliations feature', function() {
|
||||
beforeEach(async function() {
|
||||
await this.UserController.promises.ensureAffiliationsMiddleware(
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
@@ -623,10 +623,10 @@ describe('UserController', function() {
|
||||
expect(this.next).to.be.calledWith()
|
||||
})
|
||||
})
|
||||
describe('without ensureAffiliations query parameter', function() {
|
||||
describe('without ensureAffiliation query parameter', function() {
|
||||
beforeEach(async function() {
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
await this.UserController.promises.ensureAffiliationsMiddleware(
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
@@ -652,8 +652,8 @@ describe('UserController', function() {
|
||||
}
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliations = true
|
||||
await this.UserController.promises.ensureAffiliationsMiddleware(
|
||||
this.req.query.ensureAffiliation = true
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
@@ -684,8 +684,8 @@ describe('UserController', function() {
|
||||
}
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliations = true
|
||||
await this.UserController.promises.ensureAffiliationsMiddleware(
|
||||
this.req.query.ensureAffiliation = true
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
@@ -716,8 +716,8 @@ describe('UserController', function() {
|
||||
}
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliations = true
|
||||
await this.UserController.promises.ensureAffiliationsMiddleware(
|
||||
this.req.query.ensureAffiliation = true
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
@@ -748,8 +748,8 @@ describe('UserController', function() {
|
||||
}
|
||||
]
|
||||
this.Features.hasFeature.withArgs('affiliations').returns(true)
|
||||
this.req.query.ensureAffiliations = true
|
||||
await this.UserController.promises.ensureAffiliationsMiddleware(
|
||||
this.req.query.ensureAffiliation = true
|
||||
await this.UserController.promises.ensureAffiliationMiddleware(
|
||||
this.req,
|
||||
this.res,
|
||||
this.next
|
||||
|
||||
Reference in New Issue
Block a user