diff --git a/aleksis/apps/matrix/tests/test_matrix.py b/aleksis/apps/matrix/tests/test_matrix.py index 7c10984e96ab40c8b0b8635be1f8222da029ec5b..5efb3a1f04be829a4fc86a775d42b4caa987ca56 100644 --- a/aleksis/apps/matrix/tests/test_matrix.py +++ b/aleksis/apps/matrix/tests/test_matrix.py @@ -403,3 +403,17 @@ def test_alias_room_id_using_group(matrix_bot_user): assert g.matrix_room_id == room.room_id assert g.matrix_alias == room.alias + + +def test_matrix_profile(): + p1 = Person.objects.create(first_name="Test", last_name="Person") + + with pytest.raises(ValueError): + profile = MatrixProfile.from_person(p1) + + p1.user = User.objects.create(username="test") + p1.save() + + profile = MatrixProfile.from_person(p1) + + assert profile == MatrixProfile.from_person(p1)