From 2ed4c794ce34b795c02e3eb2796b129e2a7e8edb Mon Sep 17 00:00:00 2001 From: Jeremy Walker Date: Thu, 13 Jan 2022 12:06:04 +0000 Subject: [PATCH] Member badge shouldn't use estimate for percentage awardees --- app/models/badges/member_badge.rb | 4 ++++ test/models/badges/member_badge_test.rb | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/app/models/badges/member_badge.rb b/app/models/badges/member_badge.rb index 8e20b60caf..692a15a351 100644 --- a/app/models/badges/member_badge.rb +++ b/app/models/badges/member_badge.rb @@ -12,5 +12,9 @@ def award_to?(_user) def send_email_on_acquisition? false end + + def percentage_awardees + 100 + end end end diff --git a/test/models/badges/member_badge_test.rb b/test/models/badges/member_badge_test.rb index 3321c57845..a9570ce3c7 100644 --- a/test/models/badges/member_badge_test.rb +++ b/test/models/badges/member_badge_test.rb @@ -13,4 +13,9 @@ class Badge::MemberBadgeTest < ActiveSupport::TestCase test "award_to?" do assert build(:member_badge).award_to?(nil) end + + test "percentage_awardees" do + badge = create :member_badge + assert_equal 100, badge.percentage_awardees + end end