Merge pull request #7810 from overleaf/ta-settings-intermediate-pages

[SettingsPage] Github and Dropbox Linking Flow Improvements

GitOrigin-RevId: 4fd69e7e3a8989b2478299751582007635f9e0b0
This commit is contained in:
Timothée Alby
2022-05-17 08:03:29 +00:00
committed by Copybot
parent c043db0ed9
commit 4b87568e4f
7 changed files with 54 additions and 0 deletions
@@ -311,6 +311,19 @@ describe('UserPagesController', function () {
return this.UserPagesController.settingsPage(this.req, this.res)
})
it("should set and clear 'projectSyncSuccessMessage'", function (done) {
this.SplitTestHandler.promises.getAssignment = sinon
.stub()
.resolves({ variant: 'react' })
this.req.session.projectSyncSuccessMessage = 'Some Sync Success'
this.res.render = (page, opts) => {
opts.projectSyncSuccessMessage.should.equal('Some Sync Success')
expect(this.req.session.projectSyncSuccessMessage).to.not.exist
return done()
}
return this.UserPagesController.settingsPage(this.req, this.res)
})
describe('when ldap.updateUserDetailsOnLogin is true', function () {
beforeEach(function () {
return (this.settings.ldap = { updateUserDetailsOnLogin: true })