Add a getInvitedMembersWithPrivilegeLevels function.

Then use it to build the loadProject view-model.
This commit is contained in:
Shane Kilkelly
2017-09-20 10:02:43 +01:00
parent cf54989e6a
commit 8460160076
4 changed files with 53 additions and 16 deletions
@@ -109,7 +109,7 @@ describe "EditorHttpController", ->
]
@ProjectEditorHandler.buildProjectModelView = sinon.stub().returns(@projectModelView)
@ProjectGetter.getProjectWithoutDocLines = sinon.stub().callsArgWith(1, null, @project)
@CollaboratorsHandler.getMembersWithPrivilegeLevels = sinon.stub().callsArgWith(1, null, @members)
@CollaboratorsHandler.getInvitedMembersWithPrivilegeLevels = sinon.stub().callsArgWith(1, null, @members)
@CollaboratorsInviteHandler.getAllInvites = sinon.stub().callsArgWith(1, null, @invites)
@UserGetter.getUser = sinon.stub().callsArgWith(2, null, @user)
@@ -125,7 +125,7 @@ describe "EditorHttpController", ->
.should.equal true
it "should get the list of users in the project", ->
@CollaboratorsHandler.getMembersWithPrivilegeLevels
@CollaboratorsHandler.getInvitedMembersWithPrivilegeLevels
.calledWith(@project)
.should.equal true