From 9ff61ed793b7fd968b51c5f6e4b72958adeae977 Mon Sep 17 00:00:00 2001 From: raeno Date: Fri, 14 Dec 2018 20:23:51 +0100 Subject: [PATCH] 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. --- priv/static/index.html | 2 +- test/web/ostatus/ostatus_controller_test.exs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) 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