Skip to content

Commit

Permalink
Remove socket configuration (#2341)
Browse files Browse the repository at this point in the history
* Member badge shouldn't use estimate for percentage awardees (#2330)

* Remove socket configuration

Co-authored-by: Jeremy Walker <jez.walker@gmail.com>
  • Loading branch information
ErikSchierboom and iHiD authored Jan 28, 2022
1 parent a0b69ba commit f6dcbac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
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
1 change: 0 additions & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ default: &default
pool: 50
username: exercism
password: exercism
socket: <%= Exercism.config.mysql_socket %>
timeout: 5000

host: <%= Exercism.config.mysql_master_endpoint %>
Expand Down
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

0 comments on commit f6dcbac

Please sign in to comment.