mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 00:05:27 -05:00
fe4c48b7fb
[misc] run core tests in SAAS/Server CE/Server Pro environment GitOrigin-RevId: 6278ae1eb760a4c0c16da1b71efdde844764a526
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
/* eslint-disable
|
|
node/handle-callback-err,
|
|
*/
|
|
// TODO: This file was created by bulk-decaffeinate.
|
|
// Fix any style issues and re-enable lint.
|
|
/*
|
|
* decaffeinate suggestions:
|
|
* DS102: Remove unnecessary code created because of implicit returns
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
*/
|
|
const { expect } = require('chai')
|
|
const async = require('async')
|
|
const User = require('./helpers/User')
|
|
|
|
describe('SettingsPage', function () {
|
|
beforeEach(function (done) {
|
|
this.user = new User()
|
|
return async.series(
|
|
[
|
|
this.user.ensureUserExists.bind(this.user),
|
|
this.user.login.bind(this.user),
|
|
],
|
|
done
|
|
)
|
|
})
|
|
|
|
it('load settings page', function (done) {
|
|
return this.user.getUserSettingsPage((err, statusCode) => {
|
|
statusCode.should.equal(200)
|
|
return done()
|
|
})
|
|
})
|
|
|
|
it('update main email address', function (done) {
|
|
const newEmail = 'foo@bar.com'
|
|
return this.user.updateSettings({ email: newEmail }, error => {
|
|
expect(error).not.to.exist
|
|
return this.user.get((error, user) => {
|
|
user.email.should.equal(newEmail)
|
|
user.emails.length.should.equal(1)
|
|
user.emails[0].email.should.equal(newEmail)
|
|
return done()
|
|
})
|
|
})
|
|
})
|
|
})
|