From f32e19f66881ed0939d83e2810c29081d5b11e16 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 19 May 2018 06:11:45 +0000 Subject: webfinger: add tests --- 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 4a5a9ea85..e733afa59 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( + "http://gerzilla.de/.well-known/webfinger?resource=acct:kaniini@gerzilla.de", + [Accept: "application/xrd+xml,application/jrd+json"], + follow_redirect: true + ) do + {:ok, + %Response{ + status_code: 200, + body: File.read!("test/fixtures/httpoison_mock/kaniini@gerzilla.de.json") + }} + end + def get( "http://framatube.org/.well-known/webfinger?resource=acct:framasoft@framatube.org", [Accept: "application/xrd+xml,application/jrd+json"], -- cgit v1.2.3