feat(gamification): expand badge tiers and count only outgoing likes
This commit is contained in:
@@ -44,11 +44,22 @@ def test_highest_level_has_no_next_level_or_remaining_progress():
|
||||
def test_earned_badges_include_every_reached_global_and_activity_milestone():
|
||||
badges = earned_badges(
|
||||
total_points=300,
|
||||
activity_counts={"attendance": 5, "posts": 1, "comments": 4, "likes": 50},
|
||||
activity_counts={"attendance": 5, "posts": 25, "comments": 4, "likes": 50},
|
||||
)
|
||||
badge_ids = {badge["id"] for badge in badges}
|
||||
|
||||
assert {"level-companion", "level-contributor", "level-ally"} <= badge_ids
|
||||
assert {"attendance-1", "attendance-5", "post-1", "likes-10", "likes-50"} <= badge_ids
|
||||
assert {
|
||||
"attendance-1",
|
||||
"attendance-5",
|
||||
"post-1",
|
||||
"post-5",
|
||||
"post-10",
|
||||
"post-25",
|
||||
"comment-1",
|
||||
"likes-1",
|
||||
"likes-10",
|
||||
"likes-50",
|
||||
} <= badge_ids
|
||||
assert "comment-5" not in badge_ids
|
||||
assert not any(badge_id.startswith("save-") for badge_id in badge_ids)
|
||||
|
||||
Reference in New Issue
Block a user