mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
FIX: Correct user profile URLs in /about
crawler view
This commit is contained in:
parent
9917b9cb21
commit
cc6d722de1
@ -14,8 +14,8 @@
|
|||||||
<div class='admins-list' itemscope itemtype='http://schema.org/ItemList'>
|
<div class='admins-list' itemscope itemtype='http://schema.org/ItemList'>
|
||||||
<% @about.admins.each do |user| %>
|
<% @about.admins.each do |user| %>
|
||||||
<div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
<div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
||||||
<meta itemprop='url' content='<%= user_path(user) %>'>
|
<meta itemprop='url' content='<%= user_path(user.username_lower) %>'>
|
||||||
<a href='<%= user_path(user) %>' itemprop='item'>
|
<a href='<%= user_path(user.username_lower) %>' itemprop='item'>
|
||||||
<span itemprop='image'>
|
<span itemprop='image'>
|
||||||
<img width="45" height="45" class="avatar" src="<%= user.small_avatar_url %>">
|
<img width="45" height="45" class="avatar" src="<%= user.small_avatar_url %>">
|
||||||
</span>
|
</span>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
<div class='moderators-list' itemscope itemtype='http://schema.org/ItemList'>
|
<div class='moderators-list' itemscope itemtype='http://schema.org/ItemList'>
|
||||||
<% @about.moderators.each do |user| %>
|
<% @about.moderators.each do |user| %>
|
||||||
<div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
<div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
||||||
<meta itemprop='url' content='<%= user_path(user) %>'>
|
<meta itemprop='url' content='<%= user_path(user.username_lower) %>'>
|
||||||
<a href='<%= user_path(user) %>' itemprop='item'>
|
<a href='<%= user_path(user.username_lower) %>' itemprop='item'>
|
||||||
<span itemprop='image'>
|
<span itemprop='image'>
|
||||||
<img width="45" height="45" class="avatar" src="<%= user.small_avatar_url %>">
|
<img width="45" height="45" class="avatar" src="<%= user.small_avatar_url %>">
|
||||||
</span>
|
</span>
|
||||||
|
@ -35,6 +35,13 @@ describe AboutController do
|
|||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
expect(response.body).to include("<title>About - Discourse</title>")
|
expect(response.body).to include("<title>About - Discourse</title>")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should include correct user URLs" do
|
||||||
|
Fabricate(:admin, username: "anAdminUser")
|
||||||
|
get '/about', headers: { 'HTTP_USER_AGENT' => 'Googlebot' }
|
||||||
|
expect(response.status).to eq(200)
|
||||||
|
expect(response.body).to include("/u/anadminuser")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "serializes stats when 'Guardian#can_see_about_stats?' is true" do
|
it "serializes stats when 'Guardian#can_see_about_stats?' is true" do
|
||||||
|
Loading…
Reference in New Issue
Block a user