Add missing title attribute to user profile page (#1349)
* Add missing title attribute * Add spec * Fix test
This commit is contained in:
parent
430b80d3c3
commit
28736cda20
3 changed files with 7 additions and 1 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://dev.to/<%= @user.username %>" />
|
||||
<meta property="og:title" content="<%= @user.name %> — - DEV Profile" />
|
||||
<meta property="og:title" content="<%= @user.name %> — DEV Profile" />
|
||||
<meta property="og:image" content="<%= GeneratedImage.new(@user).social_image %>" >
|
||||
<meta property="og:description" content="<%= @user.summary %>" />
|
||||
<meta property="og:site_name" content="The DEV Community" />
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<% title @user.name %>
|
||||
|
||||
<%= content_for :page_meta do %>
|
||||
<%= render "users/meta" %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ describe "User index", type: :feature do
|
|||
end
|
||||
end
|
||||
|
||||
it "shows proper title tag" do
|
||||
expect(page).to have_title("#{user.name} - DEV Community 👩💻👨💻")
|
||||
end
|
||||
|
||||
it "shows user's articles" do
|
||||
within(".single-article") do
|
||||
expect(page).to have_content(article.title)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue