Skip to content

Commit

Permalink
Fix notification icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored and iHiD committed Aug 16, 2023
1 parent 41c8282 commit 2c62dbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class User::Notifications::AcquiredTrophyNotification < User::Notification

def url = Exercism::Routes.track_url(track, anchor: "trophy-cabinet")
def image_type = :icon
def image_url = trophy.icon
def image_path = "graphics/#{trophy.icon}.svg"
def guard_params = "Track##{track.id}|Trophy##{trophy.id}"

def i18n_params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class User::Notifications::AcquiredTrophyNotificationTest < ActiveSupport::TestC
assert_equal "#{user.id}|acquired_trophy|Track##{track.id}|Trophy##{trophy.id}", notification.uniqueness_key
assert_equal "You've been awarded the Magnificent Mentee trophy on the Ruby track", notification.text
assert_equal :icon, notification.image_type
assert_equal trophy.icon, notification.image_url
assert notification.image_url.starts_with?("/assets/graphics/trophy-mentored-")
assert_equal "https://test.exercism.org/tracks/ruby#trophy-cabinet", notification.url
assert_equal "/tracks/#{track.slug}#trophy-cabinet", notification.path
end
Expand Down

0 comments on commit 2c62dbd

Please sign in to comment.