mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-21 18:02:24 +00:00
Add room state test
This commit is contained in:
parent
87144ee37d
commit
4793970e87
@ -17,7 +17,8 @@ func TestCreateRoom(t *testing.T) {
|
||||
request := createroom.Request{
|
||||
RoomAliasName: "room1",
|
||||
Name: "room1",
|
||||
Topic: "topic"}
|
||||
Topic: "topic",
|
||||
Preset: createroom.PublicChat}
|
||||
|
||||
room, err := user.CreateRoom(request)
|
||||
assert.NoError(t, err)
|
||||
@ -25,6 +26,7 @@ func TestCreateRoom(t *testing.T) {
|
||||
assert.Equal(t, request.Name, room.Name())
|
||||
assert.Equal(t, request.Topic, room.Topic())
|
||||
assert.Equal(t, user.ID(), room.Creator().ID())
|
||||
assert.Equal(t, request.Preset, room.State())
|
||||
assert.Equal(t, 1, len(backend.rooms))
|
||||
assert.Equal(t, "!"+room.(*Room).id+":"+backend.hostname, room.ID())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user