Implement Credo software design suggestions
This commit is contained in:
@@ -22,6 +22,8 @@ defmodule Mobilizon.Federation.ActivityPub.TransmogrifierTest do
|
||||
|
||||
alias Mobilizon.GraphQL.API
|
||||
|
||||
alias Mobilizon.Web.Endpoint
|
||||
|
||||
setup_all do
|
||||
HTTPoison.start()
|
||||
end
|
||||
@@ -961,7 +963,7 @@ defmodule Mobilizon.Federation.ActivityPub.TransmogrifierTest do
|
||||
}
|
||||
|
||||
expected_tag = %{
|
||||
"href" => Mobilizon.Web.Endpoint.url() <> "/tags/2hu",
|
||||
"href" => Endpoint.url() <> "/tags/2hu",
|
||||
"type" => "Hashtag",
|
||||
"name" => "#2hu"
|
||||
}
|
||||
@@ -996,7 +998,7 @@ defmodule Mobilizon.Federation.ActivityPub.TransmogrifierTest do
|
||||
{:ok, activity, _} = API.Comments.create_comment(%{actor_id: actor.id, text: "#2hu"})
|
||||
|
||||
expected_tag = %{
|
||||
"href" => Mobilizon.Web.Endpoint.url() <> "/tags/2hu",
|
||||
"href" => Endpoint.url() <> "/tags/2hu",
|
||||
"type" => "Hashtag",
|
||||
"name" => "#2hu"
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ defmodule Mobilizon.Federation.WebFingerTest do
|
||||
|
||||
alias Mobilizon.Federation.WebFinger
|
||||
|
||||
alias Mobilizon.Web.Endpoint
|
||||
|
||||
@mastodon_account "tcit@social.tcit.fr"
|
||||
@mastodon_account_username "tcit"
|
||||
@pleroma_account "lain@pleroma.soykaf.com"
|
||||
@@ -24,7 +26,7 @@ defmodule Mobilizon.Federation.WebFingerTest do
|
||||
test "returns a link to the xml lrdd" do
|
||||
host_info = WebFinger.host_meta()
|
||||
|
||||
assert String.contains?(host_info, Mobilizon.Web.Endpoint.url())
|
||||
assert String.contains?(host_info, Endpoint.url())
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,7 +36,7 @@ defmodule Mobilizon.Federation.WebFingerTest do
|
||||
|
||||
{:ok, result} =
|
||||
WebFinger.webfinger(
|
||||
"#{actor.preferred_username}@#{Mobilizon.Web.Endpoint.host()}",
|
||||
"#{actor.preferred_username}@#{Endpoint.host()}",
|
||||
"JSON"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user