update test

This commit is contained in:
Maksim Pechnikov 2018-12-02 22:05:28 +03:00
commit 6cfdc11e32
7 changed files with 384 additions and 19 deletions

View file

@ -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")

View file

@ -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)

View file

@ -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