Fix room tag tests
This commit is contained in:
parent
2a02f518b2
commit
e42ce27e0a
@ -65,12 +65,12 @@ func TestRoom_Tags_Empty(t *testing.T) {
|
|||||||
tags := room.Tags()
|
tags := room.Tags()
|
||||||
assert.Len(t, tags, 1)
|
assert.Len(t, tags, 1)
|
||||||
assert.Equal(t, "", tags[0].Tag)
|
assert.Equal(t, "", tags[0].Tag)
|
||||||
assert.Equal(t, 0.5, tags[0].Order)
|
assert.Equal(t, "0.5", tags[0].Order)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRoom_Tags_NotEmpty(t *testing.T) {
|
func TestRoom_Tags_NotEmpty(t *testing.T) {
|
||||||
room := rooms.NewRoom("!test:maunium.net", "@tulir:maunium.net")
|
room := rooms.NewRoom("!test:maunium.net", "@tulir:maunium.net")
|
||||||
room.RawTags = []rooms.RoomTag{{Tag: "foo", Order: 1}, {Tag: "bar", Order: 1}}
|
room.RawTags = []rooms.RoomTag{{Tag: "foo", Order: "1"}, {Tag: "bar", Order: "1"}}
|
||||||
tags := room.Tags()
|
tags := room.Tags()
|
||||||
assert.Equal(t, room.RawTags, tags)
|
assert.Equal(t, room.RawTags, tags)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user