mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-05 10:11:02 +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())
|
||
|
}
|