public async Task CreateInviteReturnsNew() { user = Auth.CurrentUser = await GetUser("[email protected]", Privilege.Admin); BoardExtensions.Board = await BoardExtensions.BoardLookup(services, "benefact"); var rpc = new BoardsInterface(services); var firstResult = await rpc.Invite(new CreateInviteRequest() { Privilege = (Privilege)7 }); Assert.IsNotNull(firstResult); var secondResult = await rpc.Invite(new CreateInviteRequest() { Privilege = (Privilege)3 }); Assert.AreNotEqual(firstResult, secondResult); }
public async Task PrivateBoardJoinSucceeds() { user = Auth.CurrentUser = await GetUser("*****@*****.**", Privilege.Admin); BoardExtensions.Board = await BoardExtensions.BoardLookup(services, "benefact"); var rpc = new BoardsInterface(services); var firstResult = await rpc.Invite(new CreateInviteRequest() { Privilege = (Privilege)7 }); Assert.IsNotNull(firstResult); user = Auth.CurrentUser = await GetUser("[email protected]", null); var joinResult = await rpc.Join(new JoinRequest() { Key = firstResult }); Assert.AreEqual(7, (int)joinResult.Privilege); }