From 7fbcd4caaf877749c13d6755eaaa956ac0ea5012 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 14 Aug 2018 17:07:01 +0000 Subject: test: add kroeg fixtures --- test/support/httpoison_mock.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/support') diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex index a52d44ed6..dc83b115e 100644 --- a/test/support/httpoison_mock.ex +++ b/test/support/httpoison_mock.ex @@ -3,6 +3,18 @@ defmodule HTTPoisonMock do def get(url, body \\ [], headers \\ []) + def get( + "https://puckipedia.com/", + [Accept: "application/activity+json"], + [] + ) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/puckipedia.com.json") + }} + end + def get( "https://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de", [Accept: "application/xrd+xml,application/jrd+json"], -- cgit v1.2.3 From b8560e5ed5612e37af8a759128e322025922a862 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 14 Aug 2018 17:15:33 +0000 Subject: testsuite: formatting --- test/support/httpoison_mock.ex | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'test/support') diff --git a/test/support/httpoison_mock.ex b/test/support/httpoison_mock.ex index dc83b115e..527c2e1f7 100644 --- a/test/support/httpoison_mock.ex +++ b/test/support/httpoison_mock.ex @@ -3,11 +3,7 @@ defmodule HTTPoisonMock do def get(url, body \\ [], headers \\ []) - def get( - "https://puckipedia.com/", - [Accept: "application/activity+json"], - [] - ) do + def get("https://puckipedia.com/", [Accept: "application/activity+json"], _) do {:ok, %Response{ status_code: 200, -- cgit v1.2.3