forked from AkkomaGang/akkoma
Fix tests
Notice test has been failing due to missing placeholder in index.html I've tried to use fixtures to substitute that file in test environment but it became too much hassle. Fixtures are not copied to _build directory so I'd need to change file fetching logic. IMO it doesn't worth it since pleroma-fe already has this placeholder merged and all future updated of index.html will include it.
This commit is contained in:
parent
46486595ff
commit
9ff61ed793
2 changed files with 3 additions and 5 deletions
|
@ -1 +1 @@
|
|||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Pleroma</title><link rel=icon type=image/png href=/favicon.png><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link href=/static/css/app.ef3dfe574a06c79d5c5ca88943ef4673.css rel=stylesheet></head><body style="display: none"><div id=app></div><script type=text/javascript src=/static/js/manifest.f60b0c5412942809e9e3.js></script><script type=text/javascript src=/static/js/vendor.3be52ab73ddf60b35112.js></script><script type=text/javascript src=/static/js/app.c10f63ec367fc4f92eea.js></script></body></html>
|
||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Pleroma</title><!--server-generated-meta--><link rel=icon type=image/png href=/favicon.png><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link href=/static/css/app.ef3dfe574a06c79d5c5ca88943ef4673.css rel=stylesheet></head><body style="display: none"><div id=app></div><script type=text/javascript src=/static/js/manifest.f60b0c5412942809e9e3.js></script><script type=text/javascript src=/static/js/vendor.3be52ab73ddf60b35112.js></script><script type=text/javascript src=/static/js/app.c10f63ec367fc4f92eea.js></script></body></html>
|
|
@ -136,17 +136,15 @@ test "404s on nonexistent activities", %{conn: conn} do
|
|||
|> response(404)
|
||||
end
|
||||
|
||||
test "renders notice metatags in html format" do
|
||||
test "renders notice metatags in html format", %{conn: conn} do
|
||||
note_activity = insert(:note_activity)
|
||||
|
||||
conn = get(conn, "/notice/#{note_activity.id}")
|
||||
|
||||
body = html_response(conn, 200)
|
||||
twitter_card_summary = "<meta content=\"summary\" property=\"twitter:card\">"
|
||||
|
||||
description_content =
|
||||
"<meta content=\"#{note_activity.data["object"]["content"]}\" property=\"og:description\">"
|
||||
|
||||
body = html_response(conn, 200)
|
||||
assert body =~ twitter_card_summary
|
||||
assert body =~ description_content
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue