diff --git a/app/assets/images/system_user.png b/app/assets/images/system_user.png new file mode 100644 index 000000000..5204feb44 Binary files /dev/null and b/app/assets/images/system_user.png differ diff --git a/app/controllers/users/avatars_controller.rb b/app/controllers/users/avatars_controller.rb index 86fc678bf..61ce75f9f 100644 --- a/app/controllers/users/avatars_controller.rb +++ b/app/controllers/users/avatars_controller.rb @@ -8,7 +8,7 @@ class Users::AvatarsController < ApplicationController def show if @user.system? - redirect_to "/apple-touch-icon.png" + redirect_to view_context.image_path("system_user.png") elsif @user.avatar.attached? redirect_to rails_blob_url(@user.avatar.variant(:thumb), disposition: "inline") elsif stale? @user, cache_control: cache_control diff --git a/test/controllers/users/avatars_controller_test.rb b/test/controllers/users/avatars_controller_test.rb index 3320dd6a4..737c28267 100644 --- a/test/controllers/users/avatars_controller_test.rb +++ b/test/controllers/users/avatars_controller_test.rb @@ -9,7 +9,7 @@ class Users::AvatarsControllerTest < ActionDispatch::IntegrationTest get user_avatar_path(users(:system)) assert_response :redirect - assert_redirected_to "/apple-touch-icon.png" + assert_redirected_to ActionController::Base.helpers.image_path("system_user.png") end test "show own initials without caching" do