mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-09 20:21:03 +00:00
22 lines
369 B
Go
22 lines
369 B
Go
|
package memory
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestUserID(t *testing.T) {
|
||
|
var (
|
||
|
userName = "user1"
|
||
|
hostName = "localhost"
|
||
|
expectedUserID = "@user1:localhost"
|
||
|
)
|
||
|
|
||
|
backend := NewBackend(hostName)
|
||
|
user, _, err := backend.Register(userName, "", "")
|
||
|
assert.Nil(t, err)
|
||
|
|
||
|
assert.Equal(t, expectedUserID, user.ID())
|
||
|
}
|