mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 03:17:51 +00:00
test: add malformed OGP data fixture
This commit is contained in:
parent
dafb6f0b5e
commit
4e76f9fde1
2 changed files with 4878 additions and 0 deletions
4874
test/fixtures/rich_media/malformed-data.html
vendored
Normal file
4874
test/fixtures/rich_media/malformed-data.html
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -657,6 +657,10 @@ defmodule HttpRequestMock do
|
||||||
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}}
|
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/ogp.html")}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get("http://example.com/malformed", _, _, _) do
|
||||||
|
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/malformed-data.html")}}
|
||||||
|
end
|
||||||
|
|
||||||
def get("http://example.com/empty", _, _, _) do
|
def get("http://example.com/empty", _, _, _) do
|
||||||
{:ok, %Tesla.Env{status: 200, body: "hello"}}
|
{:ok, %Tesla.Env{status: 200, body: "hello"}}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue