mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-12-22 08:51:50 +00:00
Add test of room user count
This commit is contained in:
parent
213abebf0a
commit
38f9c25b1b
@ -103,3 +103,21 @@ func TestLeaveRoom(t *testing.T) {
|
||||
err = user.LeaveRoom(room)
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
||||
func TestRoomUserCount(t *testing.T) {
|
||||
backend := NewBackend("localhost")
|
||||
|
||||
user1, _, err := backend.Register("user1", "", "")
|
||||
assert.Nil(t, err)
|
||||
|
||||
request := createroom.Request{
|
||||
RoomAliasName: "room1",
|
||||
Name: "room1",
|
||||
Topic: "topic"}
|
||||
|
||||
room, err := user1.CreateRoom(request)
|
||||
assert.Nil(t, err)
|
||||
assert.Len(t, room.Users(), 1)
|
||||
|
||||
// TODO: add join another user test
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user