Mock HTTPoison in testing.
This commit is contained in:
parent
7269c51f3a
commit
d982f04a65
19 changed files with 2527 additions and 9 deletions
|
|
@ -1,4 +1,6 @@
|
|||
defmodule Pleroma.Web.Salmon do
|
||||
@httpoison Application.get_env(:pleroma, :httpoison)
|
||||
|
||||
use Bitwise
|
||||
alias Pleroma.Web.XML
|
||||
alias Pleroma.Web.OStatus.ActivityRepresenter
|
||||
|
|
@ -135,7 +137,7 @@ defmodule Pleroma.Web.Salmon do
|
|||
|
||||
defp send_to_user(_,_,_), do: nil
|
||||
|
||||
def publish(user, activity, poster \\ &HTTPoison.post/3)
|
||||
def publish(user, activity, poster \\ &@httpoison.post/3)
|
||||
def publish(%{info: %{"keys" => keys}} = user, activity, poster) do
|
||||
feed = ActivityRepresenter.to_simple_form(activity, user, true)
|
||||
|> ActivityRepresenter.wrap_with_entry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue