Fix unit test

This commit is contained in:
James Allen 2016-03-08 12:07:42 +00:00
parent 5f5445f625
commit 40048d49a2

View file

@ -84,8 +84,8 @@ describe "ProjectGetter", ->
@fields = {"mock": "fields"} @fields = {"mock": "fields"}
@Project.find = sinon.stub() @Project.find = sinon.stub()
@Project.find.withArgs({owner_ref: @user_id}, @fields).yields(null, ["mock-owned-projects"]) @Project.find.withArgs({owner_ref: @user_id}, @fields).yields(null, ["mock-owned-projects"])
@CollaboratorsHandler.getProjectsUserIsMemberOf = sinon.stub() @CollaboratorsHandler.getProjectsUserIsCollaboratorOf = sinon.stub()
@CollaboratorsHandler.getProjectsUserIsMemberOf.withArgs(@user_id, @fields).yields(null, ["mock-rw-projects"], ["mock-ro-projects"]) @CollaboratorsHandler.getProjectsUserIsCollaboratorOf.withArgs(@user_id, @fields).yields(null, ["mock-rw-projects"], ["mock-ro-projects"])
@ProjectGetter.findAllUsersProjects @user_id, @fields, @callback @ProjectGetter.findAllUsersProjects @user_id, @fields, @callback
it "should call the callback with all the projects", -> it "should call the callback with all the projects", ->