Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member badge shouldn't use estimate for percentage awardees #2330

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/models/badges/member_badge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ def award_to?(_user)
def send_email_on_acquisition?
false
end

def percentage_awardees
100
end
end
end
5 changes: 5 additions & 0 deletions test/models/badges/member_badge_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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