projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'captcha' into 'develop'
[akkoma]
/
test
/
web
/
ostatus
/
ostatus_test.exs
diff --git
a/test/web/ostatus/ostatus_test.exs
b/test/web/ostatus/ostatus_test.exs
index 83525456b19c74e09968c7d70cfe31d45f1a760e..403cc7095ddb077839fc74bca266cbfab04bdce3 100644
(file)
--- a/
test/web/ostatus/ostatus_test.exs
+++ b/
test/web/ostatus/ostatus_test.exs
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.OStatusTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus
defmodule Pleroma.Web.OStatusTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus
@@
-5,10
+9,9
@@
defmodule Pleroma.Web.OStatusTest do
alias Pleroma.{Object, Repo, User, Activity}
import Pleroma.Factory
import ExUnit.CaptureLog
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)
+ setup
_all
do
+
Tesla.Mock.mock_global
(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
end
:ok
end
@@
-512,7
+515,7
@@
defmodule Pleroma.Web.OStatusTest do
|> Map.put("type", "Article")
cs = Object.change(note_object, %{data: note_data})
|> Map.put("type", "Article")
cs = Object.change(note_object, %{data: note_data})
- {:ok, article_object} = Repo.update(cs)
+ {:ok,
_
article_object} = Repo.update(cs)
# the underlying object is now an Article instead of a note, so this should fail
refute OStatus.is_representable?(note_activity)
# the underlying object is now an Article instead of a note, so this should fail
refute OStatus.is_representable?(note_activity)