mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
Merge pull request #27834 from overleaf/ii-domain-capture-not-in-group-redirect
[web] Redirect to domain capture page GitOrigin-RevId: 15d2b8046beb5a40fc4937c337ee9655abaed8fd
This commit is contained in:
@@ -493,6 +493,26 @@ describe('ProjectListController', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('should redirect to domain capture page', async function (ctx) {
|
||||
await new Promise(resolve => {
|
||||
ctx.Features.hasFeature.withArgs('saas').returns(true)
|
||||
ctx.SplitTestHandler.promises.getAssignment
|
||||
.withArgs(ctx.req, ctx.res, 'domain-capture-redirect')
|
||||
.resolves({ variant: 'enabled' })
|
||||
ctx.Modules.promises.hooks.fire
|
||||
.withArgs(
|
||||
'findDomainCaptureAndManagedUsersGroupUserShouldBePartOf',
|
||||
ctx.user._id
|
||||
)
|
||||
.resolves([{ _id: new ObjectId() }])
|
||||
ctx.res.redirect = url => {
|
||||
url.should.equal('/domain-capture')
|
||||
resolve()
|
||||
}
|
||||
ctx.ProjectListController.projectListPage(ctx.req, ctx.res)
|
||||
})
|
||||
})
|
||||
|
||||
describe('With Institution SSO feature', function () {
|
||||
beforeEach(async function (ctx) {
|
||||
await new Promise(resolve => {
|
||||
|
||||
Reference in New Issue
Block a user