diff --git a/app/models/user/notifications/acquired_trophy_notification.rb b/app/models/user/notifications/acquired_trophy_notification.rb index f685211478..eb89b55ee8 100644 --- a/app/models/user/notifications/acquired_trophy_notification.rb +++ b/app/models/user/notifications/acquired_trophy_notification.rb @@ -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 diff --git a/test/models/user/notifications/acquired_trophy_notification_test.rb b/test/models/user/notifications/acquired_trophy_notification_test.rb index f5476be1db..f6f10d9b82 100644 --- a/test/models/user/notifications/acquired_trophy_notification_test.rb +++ b/test/models/user/notifications/acquired_trophy_notification_test.rb @@ -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