mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add a test for when the user can't be found.
This commit is contained in:
parent
522786d45e
commit
575bdc62ec
1 changed files with 10 additions and 0 deletions
|
@ -72,6 +72,16 @@ describe "WebApiManager", ->
|
|||
.calledWith(new Error("web returned failure status code: 500"))
|
||||
.should.equal true
|
||||
|
||||
describe "when the user cannot be found", ->
|
||||
beforeEach ->
|
||||
@request.get = sinon.stub().callsArgWith(1, null, {statusCode: 404}, "nothing")
|
||||
@WebApiManager.getUserInfo @user_id, @callback
|
||||
|
||||
it "should return a null value", ->
|
||||
@callback
|
||||
.calledWith(null, null)
|
||||
.should.equal true
|
||||
|
||||
|
||||
describe "getProjectDetails", ->
|
||||
describe "successfully", ->
|
||||
|
|
Loading…
Reference in a new issue