mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1793 from overleaf/fix-name-removed-transfer-ownership
Fix name removed transfer ownership GitOrigin-RevId: ccbc681746033017686c4e36040a71ab7f98ad16
This commit is contained in:
parent
02c4edcb1c
commit
efd7cf5b01
3 changed files with 4 additions and 4 deletions
|
@ -43,13 +43,13 @@ Unit tests can be run in the `test_unit` container defined in `docker-compose.te
|
|||
The makefile contains a short cut to run these:
|
||||
|
||||
```
|
||||
make unit_test
|
||||
make test_unit
|
||||
```
|
||||
|
||||
During development it is often useful to only run a subset of tests, which can be configured with arguments to the mocha CLI:
|
||||
|
||||
```
|
||||
make unit_test MOCHA_ARGS='--grep=AuthorizationManager'
|
||||
make test_unit MOCHA_GREP='AuthorizationManager'
|
||||
```
|
||||
|
||||
### Acceptance Tests
|
||||
|
|
|
@ -51,7 +51,7 @@ module.exports = ProjectDetailsHandler =
|
|||
if typeof suffix is 'function'
|
||||
callback = suffix
|
||||
suffix = ''
|
||||
ProjectGetter.getProject project_id, {owner_ref: true}, (err, project)->
|
||||
ProjectGetter.getProject project_id, {owner_ref: true, name: true}, (err, project)->
|
||||
return callback(err) if err?
|
||||
return callback(new Errors.NotFoundError("project not found")) unless project?
|
||||
return callback() if project.owner_ref == user_id
|
||||
|
|
|
@ -104,7 +104,7 @@ describe 'ProjectDetailsHandler', ->
|
|||
|
||||
it "should transfer ownership of the project", (done) ->
|
||||
@handler.transferOwnership 'abc', '123', () =>
|
||||
sinon.assert.calledWith(@ProjectModel.update, {_id: 'abc'})
|
||||
sinon.assert.calledWith(@ProjectModel.update, {_id: 'abc'}, sinon.match({$set: {name: 'teapot'}}))
|
||||
done()
|
||||
|
||||
it "should flush the project to tpds", (done) ->
|
||||
|
|
Loading…
Reference in a new issue