Move definitions of RichMedia fixtures to test/support/http_request_mock.ex
This commit is contained in:
parent
c00fba4f7d
commit
d9f3af477d
2 changed files with 14 additions and 11 deletions
|
|
@ -653,6 +653,14 @@ defmodule HttpRequestMock do
|
|||
{:ok, Tesla.Mock.json(%{"id" => "https://social.heldscal.la/user/23211"}, status: 200)}
|
||||
end
|
||||
|
||||
def get("http://example.com/ogp", _, _, _) do
|
||||
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}}
|
||||
end
|
||||
|
||||
def get("http://example.com/empty", _, _, _) do
|
||||
{:ok, %Tesla.Env{status: 200, body: "hello"}}
|
||||
end
|
||||
|
||||
def get(url, query, body, headers) do
|
||||
{:error,
|
||||
"Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue