SearchController Test: Fix test.
This commit is contained in:
parent
cc52f03566
commit
8532325d65
|
@ -279,7 +279,8 @@ test "search", %{conn: conn} do
|
||||||
end
|
end
|
||||||
|
|
||||||
test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
|
test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
|
||||||
clear_config([:instance, :search_function], :plain)
|
old_config = Application.get_env(:postgres, :version)
|
||||||
|
Application.put_env(:postgres, :version, 10.0)
|
||||||
|
|
||||||
capture_log(fn ->
|
capture_log(fn ->
|
||||||
{:ok, %{id: activity_id}} =
|
{:ok, %{id: activity_id}} =
|
||||||
|
@ -297,6 +298,8 @@ test "search fetches remote statuses and prefers them over other results", %{con
|
||||||
%{"id" => ^activity_id}
|
%{"id" => ^activity_id}
|
||||||
] = results["statuses"]
|
] = results["statuses"]
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Application.put_env(:postgres, :version, old_config)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "search doesn't show statuses that it shouldn't", %{conn: conn} do
|
test "search doesn't show statuses that it shouldn't", %{conn: conn} do
|
||||||
|
|
Loading…
Reference in New Issue