Skip to content

Commit

Permalink
Add test for alternate locales
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernheisel committed Nov 26, 2024
1 parent 1f784da commit 6f4f7ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/seo/open_graph_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ defmodule SEO.OpenGraphTest do
assert meta_content(html, "property='og:type'", "article")
assert meta_content(html, "property='og:site_name'", "David Bernheisel's Blog")
assert meta_content(html, "property='og:locale'", "en_US")
assert meta_content(html, "property='og:locale:alternate'", "en_UK")
assert meta_content(html, "property='og:locale:alternate'", "ja_JP")
assert meta_content(html, "property='article:author'", "Foo Fighters")
assert meta_content(html, "property='article:published_time'", "2022-10-13")
assert meta_content(html, "property='article:section'", "Tech")
Expand Down
3 changes: 2 additions & 1 deletion test/support/my_app_web.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ defmodule MyAppWeb.SEO do
SEO.OpenGraph.build(
description: "A blog about development",
site_name: "David Bernheisel's Blog",
locale: "en_US"
locale: "en_US",
locale_alternate: ["en_UK", "ja_JP"]
),
twitter:
SEO.Twitter.build(
Expand Down

0 comments on commit 6f4f7ce

Please sign in to comment.