mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-25 12:12:05 -08:00
29 lines
580 B
Go
29 lines
580 B
Go
|
package bmatrix
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestPlainUsername(t *testing.T) {
|
||
|
uut := newMatrixUsername("MyUser")
|
||
|
|
||
|
assert.Equal(t, "MyUser", uut.formatted)
|
||
|
assert.Equal(t, "MyUser", uut.plain)
|
||
|
}
|
||
|
|
||
|
func TestHTMLUsername(t *testing.T) {
|
||
|
uut := newMatrixUsername("<b>MyUser</b>")
|
||
|
|
||
|
assert.Equal(t, "<b>MyUser</b>", uut.formatted)
|
||
|
assert.Equal(t, "MyUser", uut.plain)
|
||
|
}
|
||
|
|
||
|
func TestFancyUsername(t *testing.T) {
|
||
|
uut := newMatrixUsername("<MyUser>")
|
||
|
|
||
|
assert.Equal(t, "<MyUser>", uut.formatted)
|
||
|
assert.Equal(t, "<MyUser>", uut.plain)
|
||
|
}
|