mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-09 12:11:03 +00:00
Add test case for short username
This commit is contained in:
parent
ab108855c4
commit
febdc5f31f
@ -177,3 +177,14 @@ func TestPublicRooms(t *testing.T) {
|
|||||||
assert.Equal(t, rooms[0], room2)
|
assert.Equal(t, rooms[0], room2)
|
||||||
assert.Equal(t, rooms[1], room1)
|
assert.Equal(t, rooms[1], room1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestNewUserNameValidate(t *testing.T) {
|
||||||
|
backend := NewBackend("localhost")
|
||||||
|
|
||||||
|
var shortName = "u1"
|
||||||
|
|
||||||
|
user, token, err := backend.Register(shortName, "", "")
|
||||||
|
assert.Error(t, err)
|
||||||
|
assert.Nil(t, user)
|
||||||
|
assert.Empty(t, token)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user