Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit ea7d940

Browse files
committed
fix(tests): change open-graph target site to github.com
1 parent 5a9f5bf commit ea7d940

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/groupher_server_web/controller/og_test.exs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ defmodule GroupherServerWeb.Test.Controller.OG do
5353
test "return empty valid structure when url not follow open-graph" do
5454
conn = build_conn()
5555

56-
url = "https://baidu.com"
56+
url = "https://github.com"
5757
res = get(conn, "/api/og-info", %{url: url})
5858
res = json_response(res, 200)
5959

@@ -70,14 +70,15 @@ defmodule GroupherServerWeb.Test.Controller.OG do
7070
assert Map.has_key?(meta, "title")
7171

7272
title = get_in(res, ["meta", "title"])
73-
assert title == url
73+
assert is_nil(title) == false
7474

7575
description = get_in(res, ["meta", "description"])
76-
assert description == url
76+
assert is_nil(description) == false
7777

7878
image = get_in(res, ["meta", "image"])
7979
assert Map.has_key?(image, "url")
80-
assert image["url"] == nil
80+
81+
assert is_nil(image["url"]) == false
8182
end
8283

8384
test "return empty valid structure when url not found" do

0 commit comments

Comments
 (0)