Remove credo and use mix format, and lint everything

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-07-27 10:45:35 +02:00
parent df3f08c528
commit 979aad5acb
104 changed files with 2278 additions and 1487 deletions

View File

@@ -1,5 +1,4 @@
defmodule Eventos.Service.Activitypub.ActivitypubTest do
use Eventos.DataCase
import Eventos.Factory
@@ -11,7 +10,8 @@ defmodule Eventos.Service.Activitypub.ActivitypubTest do
describe "fetching actor from it's url" do
test "returns an actor" do
assert {:ok, %Actor{preferred_username: "tcit", domain: "framapiaf.org"} = actor} = ActivityPub.make_actor_from_nickname("tcit@framapiaf.org")
assert {:ok, %Actor{preferred_username: "tcit", domain: "framapiaf.org"} = actor} =
ActivityPub.make_actor_from_nickname("tcit@framapiaf.org")
end
end

View File

@@ -17,6 +17,7 @@ defmodule Eventos.Service.WebFingerTest do
{:ok, result} =
WebFinger.webfinger("#{actor.preferred_username}@#{EventosWeb.Endpoint.host()}", "JSON")
assert is_map(result)
end
@@ -29,23 +30,29 @@ defmodule Eventos.Service.WebFingerTest do
end
describe "fingering" do
test "a mastodon actor" do
actor = "tcit@social.tcit.fr"
assert {:ok, %{"subject" => "acct:" <> actor, "url" => "https://social.tcit.fr/users/tcit"}} = WebFinger.finger(actor)
assert {:ok, %{"subject" => "acct:" <> actor, "url" => "https://social.tcit.fr/users/tcit"}} =
WebFinger.finger(actor)
end
test "a pleroma actor" do
actor = "@lain@pleroma.soykaf.com"
assert {:ok, %{"subject" => "acct:" <> actor, "url" => "https://pleroma.soykaf.com/users/lain"}} = WebFinger.finger(actor)
assert {:ok,
%{"subject" => "acct:" <> actor, "url" => "https://pleroma.soykaf.com/users/lain"}} =
WebFinger.finger(actor)
end
test "a peertube actor" do
actor = "framasoft@framatube.org"
assert {:ok, %{"subject" => "acct:" <> actor, "url" => "https://framatube.org/accounts/framasoft"}} = WebFinger.finger(actor)
assert {:ok,
%{
"subject" => "acct:" <> actor,
"url" => "https://framatube.org/accounts/framasoft"
}} = WebFinger.finger(actor)
end
test "a friendica actor" do