From: raeno Date: Fri, 14 Dec 2018 19:23:51 +0000 (+0100) Subject: Fix tests X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9ff61ed793b7fd968b51c5f6e4b72958adeae977;p=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. --- diff --git a/priv/static/index.html b/priv/static/index.html index 0a2a56035..4ae1afc82 100644 --- a/priv/static/index.html +++ b/priv/static/index.html @@ -1 +1 @@ -Pleroma
\ No newline at end of file +Pleroma
\ No newline at end of file diff --git a/test/web/ostatus/ostatus_controller_test.exs b/test/web/ostatus/ostatus_controller_test.exs index 747e30154..e9e9bdb16 100644 --- a/test/web/ostatus/ostatus_controller_test.exs +++ b/test/web/ostatus/ostatus_controller_test.exs @@ -136,17 +136,15 @@ defmodule Pleroma.Web.OStatus.OStatusControllerTest 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 = "" description_content = "" - body = html_response(conn, 200) assert body =~ twitter_card_summary assert body =~ description_content end