Pleroma.Web.RichMedia.Parser: Remove test-specific codepaths
Also consolidate Tesla mocks into the HttpRequestMock module. Tests were not exercising the real codepaths. The Rich Media Preview only works with https, but most of these tests were only mocking http.
This commit is contained in:
parent
e957362779
commit
6b7b443ff9
10 changed files with 144 additions and 153 deletions
|
|
@ -28,6 +28,9 @@ defmodule Pleroma.NullCache do
|
|||
end
|
||||
end
|
||||
|
||||
@impl true
|
||||
def fetch(_, key, func), do: func.(key)
|
||||
|
||||
@impl true
|
||||
def get_and_update(_, _, func) do
|
||||
func.(nil)
|
||||
|
|
@ -36,6 +39,9 @@ defmodule Pleroma.NullCache do
|
|||
@impl true
|
||||
def expire_at(_, _, _), do: {:ok, true}
|
||||
|
||||
@impl true
|
||||
def expire(_, _, _), do: {:ok, true}
|
||||
|
||||
@impl true
|
||||
def exists?(_, _), do: {:ok, false}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue