FEATURE: Site setting to display user avatars in user menu (#24514)

This commit is contained in:
Mark VanLandingham
2023-12-07 11:30:44 -06:00
committed by GitHub
parent e4c373194d
commit ee05f57e2d
26 changed files with 314 additions and 15 deletions

View File

@ -7051,6 +7051,18 @@ RSpec.describe UsersController do
expect(notifications.size).to eq(1)
expect(notifications.first["data"]["bookmark_id"]).to eq(bookmark_with_reminder.id)
end
context "with `show_user_menu_avatars` setting enabled" do
before { SiteSetting.show_user_menu_avatars = true }
it "serializes acting_user_avatar into notifications" do
get "/u/#{user.username}/user-menu-bookmarks"
expect(response.status).to eq(200)
first_notification = response.parsed_body["notifications"].first
expect(first_notification["acting_user_avatar_template"]).to be_present
end
end
end
end