Fix room tag tests

This commit is contained in:
Tulir Asokan 2018-05-04 12:13:23 +03:00
parent 2a02f518b2
commit e42ce27e0a

View File

@ -65,12 +65,12 @@ func TestRoom_Tags_Empty(t *testing.T) {
tags := room.Tags()
assert.Len(t, tags, 1)
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) {
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()
assert.Equal(t, room.RawTags, tags)
}