mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 09:54:56 -04:00
s/eventHandlerService.getUsersCountInRoom/modelService.getUserCountInRoom/g
This commit is contained in:
parent
4d922a0f9b
commit
fbf8003237
5 changed files with 61 additions and 65 deletions
|
@ -26,45 +26,5 @@ describe('EventHandlerService', function() {
|
|||
scope = $rootScope;
|
||||
}));
|
||||
|
||||
it('should be able to get the number of joined users in a room', inject(
|
||||
function(eventHandlerService) {
|
||||
var roomId = "!foo:matrix.org";
|
||||
// set mocked data
|
||||
modelService.getRoom = function(roomId) {
|
||||
return {
|
||||
room_id: roomId,
|
||||
current_room_state: {
|
||||
members: {
|
||||
"@adam:matrix.org": {
|
||||
event: {
|
||||
content: { membership: "join" },
|
||||
user_id: "@adam:matrix.org"
|
||||
}
|
||||
},
|
||||
"@beth:matrix.org": {
|
||||
event: {
|
||||
content: { membership: "invite" },
|
||||
user_id: "@beth:matrix.org"
|
||||
}
|
||||
},
|
||||
"@charlie:matrix.org": {
|
||||
event: {
|
||||
content: { membership: "join" },
|
||||
user_id: "@charlie:matrix.org"
|
||||
}
|
||||
},
|
||||
"@danice:matrix.org": {
|
||||
event: {
|
||||
content: { membership: "leave" },
|
||||
user_id: "@danice:matrix.org"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var num = eventHandlerService.getUsersCountInRoom(roomId);
|
||||
expect(num).toEqual(2);
|
||||
}));
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue