FIX: Don't count likes from system users in the new user of the month
This commit is contained in:
parent
e1dd543a93
commit
bd0bb879e5
|
@ -41,6 +41,7 @@ module Jobs
|
|||
SUM(CASE
|
||||
WHEN pa.id IS NOT NULL THEN
|
||||
CASE
|
||||
WHEN liked_by.id <= 0 THEN 0.0
|
||||
WHEN liked_by.admin OR liked_by.moderator THEN 2.0
|
||||
WHEN liked_by.trust_level = 0 THEN 0.1
|
||||
WHEN liked_by.trust_level = 1 THEN 0.25
|
||||
|
|
|
@ -149,6 +149,7 @@ describe Jobs::GrantNewUserOfTheMonthBadges do
|
|||
PostAction.act(u4, p, PostActionType.types[:like])
|
||||
PostAction.act(um, p, PostActionType.types[:like])
|
||||
PostAction.act(ua, p, PostActionType.types[:like])
|
||||
PostAction.act(Discourse.system_user, p, PostActionType.types[:like])
|
||||
expect(granter.scores[user.id]).to eq(4.425)
|
||||
|
||||
# It goes down the more they post
|
||||
|
|
Loading…
Reference in New Issue