diff options
author | JakobDev <jakobdev@gmx.de> | 2024-12-14 19:36:09 +0100 |
---|---|---|
committer | JakobDev <jakobdev@gmx.de> | 2024-12-14 19:36:09 +0100 |
commit | 7685a1e98e96a2602d7b50cd767d18e0d1d86128 (patch) | |
tree | ceaf506defbadfc00621099f7e45463143b847ca /tests | |
parent | Merge pull request 'Regular visual regression testing' (#6117) from fnetx/pla... (diff) | |
download | forgejo-7685a1e98e96a2602d7b50cd767d18e0d1d86128.tar.xz forgejo-7685a1e98e96a2602d7b50cd767d18e0d1d86128.zip |
feat: Add summary card for repos and releases
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/opengraph_test.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/integration/opengraph_test.go b/tests/integration/opengraph_test.go index 40013bd247..89e2a85acd 100644 --- a/tests/integration/opengraph_test.go +++ b/tests/integration/opengraph_test.go @@ -97,7 +97,7 @@ func TestOpenGraphProperties(t *testing.T) { "og:title": "repo49/test/test.txt at master", "og:url": setting.AppURL + "/user27/repo49/src/branch/master/test/test.txt", "og:type": "object", - "og:image": setting.AppURL + "assets/img/avatar_default.png", + "og:image": setting.AppURL + "user27/repo49/-/summary-card", "og:site_name": siteName, }, }, @@ -108,7 +108,7 @@ func TestOpenGraphProperties(t *testing.T) { "og:title": "Page With Spaced Name", "og:url": setting.AppURL + "/user2/repo1/wiki/Page-With-Spaced-Name", "og:type": "object", - "og:image": setting.AppURL + "avatars/ab53a2911ddf9b4817ac01ddcd3d975f", + "og:image": setting.AppURL + "user2/repo1/-/summary-card", "og:site_name": siteName, }, }, @@ -119,7 +119,7 @@ func TestOpenGraphProperties(t *testing.T) { "og:title": "repo1", "og:url": setting.AppURL + "user2/repo1", "og:type": "object", - "og:image": setting.AppURL + "avatars/ab53a2911ddf9b4817ac01ddcd3d975f", + "og:image": setting.AppURL + "user2/repo1/-/summary-card", "og:site_name": siteName, }, }, @@ -131,7 +131,7 @@ func TestOpenGraphProperties(t *testing.T) { "og:url": setting.AppURL + "user27/repo49", "og:description": "A wonderful repository with more than just a README.md", "og:type": "object", - "og:image": setting.AppURL + "assets/img/avatar_default.png", + "og:image": setting.AppURL + "user27/repo49/-/summary-card", "og:site_name": siteName, }, }, @@ -167,6 +167,10 @@ func TestOpenGraphSummaryCard(t *testing.T) { url string }{ { + name: "repo", + url: "/user2/repo1/-/summary-card", + }, + { name: "issue", url: "/user2/repo1/issues/1/summary-card", }, @@ -174,6 +178,10 @@ func TestOpenGraphSummaryCard(t *testing.T) { name: "pull request", url: "/user2/repo1/pulls/2/summary-card", }, + { + name: "release", + url: "/user2/repo1/releases/summary-card/1", + }, } for _, tc := range cases { |