mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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",
|
||||
"express": "4.13.0",
|
||||
"express-session": "^1.14.2",
|
||||
"grunt": "^0.4.5",
|
||||
"heapdump": "^0.3.7",
|
||||
"http-proxy": "^1.8.1",
|
||||
"ioredis": "^2.4.0",
|
||||
|
@ -72,7 +71,7 @@
|
|||
"bunyan": "0.22.1",
|
||||
"chai": "",
|
||||
"chai-spies": "",
|
||||
"grunt": "0.4.1",
|
||||
"grunt": "0.4.5",
|
||||
"clean-css": "^3.4.18",
|
||||
"es6-promise": "^4.0.5",
|
||||
"grunt-available-tasks": "0.4.1",
|
||||
|
|
|
@ -128,16 +128,27 @@ describe "AuthenticationManager", ->
|
|||
@AuthenticationManager.setUserPassword(@user_id, @password, @callback)
|
||||
|
||||
it "should update the user's password in the database", ->
|
||||
@db.users.update
|
||||
.calledWith({
|
||||
_id: ObjectId(@user_id.toString())
|
||||
}, {
|
||||
# { _id: 58b411efedd652642a1bb10c },
|
||||
# { '$set': { hashedPassword: 'asdkjfa;osiuvandf' },
|
||||
# '$unset': { password: true } }
|
||||
args = @db.users.update.lastCall.args
|
||||
expect(args[0]).to.deep.equal {_id: ObjectId(@user_id.toString())}
|
||||
expect(args[1]).to.deep.equal {
|
||||
$set: {
|
||||
"hashedPassword": @hashedPassword
|
||||
}
|
||||
$unset: password: true
|
||||
})
|
||||
.should.equal true
|
||||
}
|
||||
# @db.users.update
|
||||
# .calledWith({
|
||||
# _id: ObjectId(@user_id.toString())
|
||||
# }, {
|
||||
# $set: {
|
||||
# "hashedPassword": @hashedPassword
|
||||
# }
|
||||
# $unset: password: true
|
||||
# })
|
||||
# .should.equal true
|
||||
|
||||
it "should hash the password", ->
|
||||
@bcrypt.genSalt
|
||||
|
|
|
@ -33,7 +33,9 @@ describe "ProjectGetter", ->
|
|||
@ProjectGetter.getProjectWithoutDocLines @project_id, @callback
|
||||
|
||||
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", ->
|
||||
excludes =
|
||||
|
@ -64,7 +66,9 @@ describe "ProjectGetter", ->
|
|||
@ProjectGetter.getProjectWithOnlyFolders @project_id, @callback
|
||||
|
||||
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", ->
|
||||
excludes =
|
||||
|
@ -102,7 +106,9 @@ describe "ProjectGetter", ->
|
|||
@ProjectGetter.getProjectWithOnlyFolders @project_id, @callback
|
||||
|
||||
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", ->
|
||||
excludes =
|
||||
|
|
Loading…
Reference in a new issue