diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-02 22:05:28 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2018-12-04 14:04:06 +0300 |
| commit | 6cfdc11e32faf84263e4c5d7b15f193ba1b832ae (patch) | |
| tree | 4a3889063dcb1edabaa93809db118df85296c888 /test/web | |
| parent | c508d41c349c3034211f41281cfe60c70a020575 (diff) | |
| download | pleroma-6cfdc11e32faf84263e4c5d7b15f193ba1b832ae.tar.gz pleroma-6cfdc11e32faf84263e4c5d7b15f193ba1b832ae.zip | |
update test
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/ostatus/ostatus_test.exs | 6 | ||||
| -rw-r--r-- | test/web/salmon/salmon_test.exs | 1 | ||||
| -rw-r--r-- | test/web/web_finger/web_finger_test.exs | 6 |
3 files changed, 13 insertions, 0 deletions
diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index 32bf6691b..83525456b 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -5,6 +5,12 @@ defmodule Pleroma.Web.OStatusTest do alias Pleroma.{Object, Repo, User, Activity} import Pleroma.Factory import ExUnit.CaptureLog + import Tesla.Mock + + setup do + mock(fn env -> apply(HttpRequestMock, :request, [env]) end) + :ok + end test "don't insert create notes twice" do incoming = File.read!("test/fixtures/incoming_note_activity.xml") diff --git a/test/web/salmon/salmon_test.exs b/test/web/salmon/salmon_test.exs index 3285c11f0..23ccc038e 100644 --- a/test/web/salmon/salmon_test.exs +++ b/test/web/salmon/salmon_test.exs @@ -15,6 +15,7 @@ defmodule Pleroma.Web.Salmon.SalmonTest do mock(fn env -> apply(HttpRequestMock, :request, [env]) end) :ok end + test "decodes a salmon" do {:ok, salmon} = File.read("test/fixtures/salmon.xml") {:ok, doc} = Salmon.decode_and_validate(@magickey, salmon) diff --git a/test/web/web_finger/web_finger_test.exs b/test/web/web_finger/web_finger_test.exs index 28d429565..32eff9b7c 100644 --- a/test/web/web_finger/web_finger_test.exs +++ b/test/web/web_finger/web_finger_test.exs @@ -2,6 +2,12 @@ defmodule Pleroma.Web.WebFingerTest do use Pleroma.DataCase alias Pleroma.Web.WebFinger import Pleroma.Factory + import Tesla.Mock + + setup do + mock(fn env -> apply(HttpRequestMock, :request, [env]) end) + :ok + end describe "host meta" do test "returns a link to the xml lrdd" do |
