projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request 'Add YunoHost to installation guides' (#518) from ilja/akkoma...
[akkoma]
/
test
/
pleroma
/
web
/
rel_me_test.exs
diff --git
a/test/pleroma/web/rel_me_test.exs
b/test/pleroma/web/rel_me_test.exs
index 65255916d083f9788e7a70f7b777515601127490..fc7abd7321bda1bf108dfda4138687c7de208665 100644
(file)
--- a/
test/pleroma/web/rel_me_test.exs
+++ b/
test/pleroma/web/rel_me_test.exs
@@
-1,9
+1,9
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.RelMeTest do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.RelMeTest do
- use
ExUnit.
Case
+ use
Pleroma.Data
Case
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
setup_all do
Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
@@
-26,13
+26,12
@@
defmodule Pleroma.Web.RelMeTest do
test "maybe_put_rel_me/2" do
profile_urls = ["https://social.example.org/users/lain"]
attr = "me"
test "maybe_put_rel_me/2" do
profile_urls = ["https://social.example.org/users/lain"]
attr = "me"
- fallback = nil
assert Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/null", profile_urls) ==
assert Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/null", profile_urls) ==
- fallback
+ {:error, {:could_not_verify, "http://example.com/rel_me/null", {:link_match, false}}}
- assert
Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/error", profile_urls) =
=
- fallback
+ assert
{:error, {:could_not_fetch, "http://example.com/rel_me/error", _}}
=
+ Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/error", profile_urls)
assert Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/anchor", profile_urls) ==
attr
assert Pleroma.Web.RelMe.maybe_put_rel_me("http://example.com/rel_me/anchor", profile_urls) ==
attr