diff options
| author | lain <lain@soykaf.club> | 2019-08-25 16:12:13 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2019-08-25 16:12:13 +0000 |
| commit | 5e7098cf69bc8d113279168f6bbc728c6f317727 (patch) | |
| tree | a628ed6b9219199d2ce97233b3d0b104ab556fa6 /test/web | |
| parent | 5853d9c8437a4c4a4e62dedaffbee5a01489cd9f (diff) | |
| parent | f3b12662731fa8d1aa458ea16fb4bcb176b77744 (diff) | |
| download | pleroma-5e7098cf69bc8d113279168f6bbc728c6f317727.tar.gz pleroma-5e7098cf69bc8d113279168f6bbc728c6f317727.zip | |
Merge branch 'bugfix/rel_me_missing_mocks' into 'develop'
Implement missing mocks for rel=me
See merge request pleroma/pleroma!1598
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/rel_me_test.exs | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/test/web/rel_me_test.exs b/test/web/rel_me_test.exs index 85515c432..2251fed16 100644 --- a/test/web/rel_me_test.exs +++ b/test/web/rel_me_test.exs @@ -5,33 +5,8 @@ defmodule Pleroma.Web.RelMeTest do use ExUnit.Case, async: true - setup do - Tesla.Mock.mock(fn - %{ - method: :get, - url: "http://example.com/rel_me/anchor" - } -> - %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor.html")} - - %{ - method: :get, - url: "http://example.com/rel_me/anchor_nofollow" - } -> - %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_anchor_nofollow.html")} - - %{ - method: :get, - url: "http://example.com/rel_me/link" - } -> - %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_link.html")} - - %{ - method: :get, - url: "http://example.com/rel_me/null" - } -> - %Tesla.Env{status: 200, body: File.read!("test/fixtures/rel_me_null.html")} - end) - + setup_all do + Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) :ok end |
