mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-05 02:01:03 +00:00
Add test case for changing room visibility
This commit is contained in:
parent
c652fcaca4
commit
5c84714d1f
@ -163,4 +163,12 @@ func TestSetRoomVisibility(t *testing.T) {
|
||||
err = user.SetRoomVisibility(room, createroom.VisibilityTypePublic)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, createroom.VisibilityTypePublic, room.Visibility())
|
||||
|
||||
// TODO: Only owner can change room visibility
|
||||
notOwnerUser, _, err := backend.Register("user2", "", "")
|
||||
assert.Nil(t, err)
|
||||
|
||||
err = notOwnerUser.SetRoomVisibility(room, createroom.VisibilityTypePrivate)
|
||||
assert.NotNil(t, err)
|
||||
assert.NotEqual(t, createroom.VisibilityTypePrivate, room.Visibility())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user