mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
Make work on both 0.10 and 6.9
This commit is contained in:
parent
8d7c39ff42
commit
98d7dc6f88
5 changed files with 31 additions and 3488 deletions
|
@ -1 +0,0 @@
|
||||||
6.9.5
|
|
3472
services/web/npm-shrinkwrap.json
generated
3472
services/web/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load diff
|
@ -25,7 +25,6 @@
|
||||||
"dateformat": "1.0.4-1.2.3",
|
"dateformat": "1.0.4-1.2.3",
|
||||||
"express": "4.13.0",
|
"express": "4.13.0",
|
||||||
"express-session": "^1.14.2",
|
"express-session": "^1.14.2",
|
||||||
"grunt": "^0.4.5",
|
|
||||||
"heapdump": "^0.3.7",
|
"heapdump": "^0.3.7",
|
||||||
"http-proxy": "^1.8.1",
|
"http-proxy": "^1.8.1",
|
||||||
"ioredis": "^2.4.0",
|
"ioredis": "^2.4.0",
|
||||||
|
@ -72,7 +71,7 @@
|
||||||
"bunyan": "0.22.1",
|
"bunyan": "0.22.1",
|
||||||
"chai": "",
|
"chai": "",
|
||||||
"chai-spies": "",
|
"chai-spies": "",
|
||||||
"grunt": "0.4.1",
|
"grunt": "0.4.5",
|
||||||
"clean-css": "^3.4.18",
|
"clean-css": "^3.4.18",
|
||||||
"es6-promise": "^4.0.5",
|
"es6-promise": "^4.0.5",
|
||||||
"grunt-available-tasks": "0.4.1",
|
"grunt-available-tasks": "0.4.1",
|
||||||
|
|
|
@ -128,16 +128,27 @@ describe "AuthenticationManager", ->
|
||||||
@AuthenticationManager.setUserPassword(@user_id, @password, @callback)
|
@AuthenticationManager.setUserPassword(@user_id, @password, @callback)
|
||||||
|
|
||||||
it "should update the user's password in the database", ->
|
it "should update the user's password in the database", ->
|
||||||
@db.users.update
|
# { _id: 58b411efedd652642a1bb10c },
|
||||||
.calledWith({
|
# { '$set': { hashedPassword: 'asdkjfa;osiuvandf' },
|
||||||
_id: ObjectId(@user_id.toString())
|
# '$unset': { password: true } }
|
||||||
}, {
|
args = @db.users.update.lastCall.args
|
||||||
$set: {
|
expect(args[0]).to.deep.equal {_id: ObjectId(@user_id.toString())}
|
||||||
"hashedPassword": @hashedPassword
|
expect(args[1]).to.deep.equal {
|
||||||
}
|
$set: {
|
||||||
$unset: password: true
|
"hashedPassword": @hashedPassword
|
||||||
})
|
}
|
||||||
.should.equal true
|
$unset: password: true
|
||||||
|
}
|
||||||
|
# @db.users.update
|
||||||
|
# .calledWith({
|
||||||
|
# _id: ObjectId(@user_id.toString())
|
||||||
|
# }, {
|
||||||
|
# $set: {
|
||||||
|
# "hashedPassword": @hashedPassword
|
||||||
|
# }
|
||||||
|
# $unset: password: true
|
||||||
|
# })
|
||||||
|
# .should.equal true
|
||||||
|
|
||||||
it "should hash the password", ->
|
it "should hash the password", ->
|
||||||
@bcrypt.genSalt
|
@bcrypt.genSalt
|
||||||
|
|
|
@ -33,7 +33,9 @@ describe "ProjectGetter", ->
|
||||||
@ProjectGetter.getProjectWithoutDocLines @project_id, @callback
|
@ProjectGetter.getProjectWithoutDocLines @project_id, @callback
|
||||||
|
|
||||||
it "should call find with the project id", ->
|
it "should call find with the project id", ->
|
||||||
@db.projects.find.calledWith(_id: ObjectId(@project_id)).should.equal true
|
expect(@db.projects.find.lastCall.args[0]).to.deep.equal {
|
||||||
|
_id: ObjectId(@project_id)
|
||||||
|
}
|
||||||
|
|
||||||
it "should exclude the doc lines", ->
|
it "should exclude the doc lines", ->
|
||||||
excludes =
|
excludes =
|
||||||
|
@ -64,7 +66,9 @@ describe "ProjectGetter", ->
|
||||||
@ProjectGetter.getProjectWithOnlyFolders @project_id, @callback
|
@ProjectGetter.getProjectWithOnlyFolders @project_id, @callback
|
||||||
|
|
||||||
it "should call find with the project id", ->
|
it "should call find with the project id", ->
|
||||||
@db.projects.find.calledWith(_id: ObjectId(@project_id)).should.equal true
|
expect(@db.projects.find.lastCall.args[0]).to.deep.equal {
|
||||||
|
_id: ObjectId(@project_id)
|
||||||
|
}
|
||||||
|
|
||||||
it "should exclude the docs and files linesaaaa", ->
|
it "should exclude the docs and files linesaaaa", ->
|
||||||
excludes =
|
excludes =
|
||||||
|
@ -102,7 +106,9 @@ describe "ProjectGetter", ->
|
||||||
@ProjectGetter.getProjectWithOnlyFolders @project_id, @callback
|
@ProjectGetter.getProjectWithOnlyFolders @project_id, @callback
|
||||||
|
|
||||||
it "should call find with the project id", ->
|
it "should call find with the project id", ->
|
||||||
@db.projects.find.calledWith(_id: ObjectId(@project_id)).should.equal true
|
expect(@db.projects.find.lastCall.args[0]).to.deep.equal {
|
||||||
|
_id: ObjectId(@project_id)
|
||||||
|
}
|
||||||
|
|
||||||
it "should exclude the docs and files linesaaaa", ->
|
it "should exclude the docs and files linesaaaa", ->
|
||||||
excludes =
|
excludes =
|
||||||
|
|
Loading…
Reference in a new issue