Fix some more typos

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2023-12-28 00:15:32 +01:00
commit 017e35fbf1
72 changed files with 120 additions and 120 deletions

View file

@ -39,7 +39,7 @@ defmodule Mix.PleromaTest do
describe "get_option/3" do
test "get from options" do
assert get_option([domain: "some-domain.com"], :domain, "Promt") == "some-domain.com"
assert get_option([domain: "some-domain.com"], :domain, "Prompt") == "some-domain.com"
end
test "get from prompt" do

View file

@ -13,7 +13,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
assert capture_log(fn ->
Mix.Tasks.Pleroma.Ecto.Rollback.run(["--env", "test"])
end) =~ "[info] Rollback succesfully"
end) =~ "[info] Rollback successfully"
Logger.configure(level: level)
end

View file

@ -26,7 +26,7 @@ defmodule Mix.Tasks.Pleroma.RobotsTxtTest do
assert file == "User-Agent: *\nDisallow: /\n"
end
test "to existance folder" do
test "to existing folder" do
path = "test/fixtures/"
file_path = path <> "robots.txt"
clear_config([:instance, :static_dir], path)

View file

@ -215,7 +215,7 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
```
config :pleroma, :mrf,
transparency_exclusions: [{"instance.tld", "Reason to exlude transparency"}]
transparency_exclusions: [{"instance.tld", "Reason to exclude transparency"}]
```
"""
end
@ -327,11 +327,11 @@ defmodule Pleroma.Config.DeprecationWarningsTest do
end) =~ "Your config is using old namespace for activity expiration configuration."
end
test "check_uploders_s3_public_endpoint/0" do
test "check_uploaders_s3_public_endpoint/0" do
clear_config([Pleroma.Uploaders.S3], public_endpoint: "https://fake.amazonaws.com/bucket/")
assert capture_log(fn ->
DeprecationWarnings.check_uploders_s3_public_endpoint()
DeprecationWarnings.check_uploaders_s3_public_endpoint()
end) =~
"Your config is using the old setting for controlling the URL of media uploaded to your S3 bucket."
end

View file

@ -321,7 +321,7 @@ defmodule Pleroma.ConfigDBTest do
}) == {:proxy_url, {:socks5, {127, 0, 0, 1}, 1234}}
end
test "tuple with n childs" do
test "tuple with n children" do
assert ConfigDB.to_elixir_types(%{
"tuple" => [
"v1",
@ -399,7 +399,7 @@ defmodule Pleroma.ConfigDBTest do
assert ConfigDB.to_elixir_types(a: 1, b: 2, c: "string") == [a: 1, b: 2, c: "string"]
end
test "complex keyword with nested mixed childs" do
test "complex keyword with nested mixed children" do
assert ConfigDB.to_elixir_types([
%{"tuple" => [":uploader", "Pleroma.Uploaders.Local"]},
%{"tuple" => [":filters", ["Pleroma.Upload.Filter.Dedupe"]]},

View file

@ -57,7 +57,7 @@ defmodule Pleroma.Conversation.ParticipationTest do
assert Participation.unread_count(other_user) == 0
end
test "for a new conversation, it sets the recipents of the participation" do
test "for a new conversation, it sets the recipients of the participation" do
user = insert(:user)
other_user = insert(:user)
third_user = insert(:user)

View file

@ -72,7 +72,7 @@ defmodule Pleroma.Emoji.LoaderTest do
assert group == "special file"
end
test "no mathing returns nil", %{groups: groups} do
test "no matching returns nil", %{groups: groups} do
group =
groups
|> Loader.match_extra("/emoji/some_undefined.png")

View file

@ -324,7 +324,7 @@ defmodule Pleroma.FormatterTest do
assert {_text, [], ^expected_tags} = Formatter.linkify(text)
end
test "parses mulitple tags in html" do
test "parses multiple tags in html" do
text = "<p>#tag1 #tag2 #tag3 #tag4</p>"
expected_tags = [
@ -347,7 +347,7 @@ defmodule Pleroma.FormatterTest do
assert {_text, [], ^expected_tags} = Formatter.linkify(text)
end
test "parses mulitple tags on mulitple lines in html" do
test "parses multiple tags on multiple lines in html" do
text =
"<p>testing...</p><p>#tag1 #tag2 #tag3 #tag4</p><p>paragraph</p><p>#tag5 #tag6 #tag7 #tag8</p>"

View file

@ -25,7 +25,7 @@ defmodule Pleroma.HealthcheckTest do
refute result.healthy
end
test "chech_health/1" do
test "check_health/1" do
result = Healthcheck.check_health(%Healthcheck{pool_size: 10, active: 9})
assert result.healthy
end

View file

@ -36,7 +36,7 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
assert opts[:certificates_verification]
end
test "https url with non standart port" do
test "https url with non-standard port" do
uri = URI.parse("https://example.com:115")
opts = Gun.options([receive_conn: false], uri)
@ -44,7 +44,7 @@ defmodule Pleroma.HTTP.AdapterHelper.GunTest do
assert opts[:certificates_verification]
end
test "merges with defaul http adapter config" do
test "merges with default http adapter config" do
defaults = Gun.options([receive_conn: false], URI.parse("https://example.com"))
assert Keyword.has_key?(defaults, :a)
assert Keyword.has_key?(defaults, :b)

View file

@ -28,7 +28,7 @@ defmodule Pleroma.OTPVersionTest do
"23.0"
end
test "with non existance file" do
test "with nonexistent file" do
assert OTPVersion.get_version_from_files([
"test/fixtures/warnings/otp_version/non-exising",
"test/fixtures/warnings/otp_version/22.4"

View file

@ -306,7 +306,7 @@ defmodule Pleroma.ReverseProxyTest do
end
describe "response content disposition header" do
test "not atachment", %{conn: conn} do
test "not attachment", %{conn: conn} do
disposition_headers_mock([
{"content-type", "image/gif"},
{"content-length", "0"}

View file

@ -226,7 +226,7 @@ defmodule Pleroma.UserTest do
assert [] = User.get_follow_requests(followed)
end
test "follow_all follows mutliple users" do
test "follow_all follows multiple users" do
user = insert(:user)
followed_zero = insert(:user)
followed_one = insert(:user)
@ -250,7 +250,7 @@ defmodule Pleroma.UserTest do
refute User.following?(user, reverse_blocked)
end
test "follow_all follows mutliple users without duplicating" do
test "follow_all follows multiple users without duplicating" do
user = insert(:user)
followed_zero = insert(:user)
followed_one = insert(:user)
@ -873,7 +873,7 @@ defmodule Pleroma.UserTest do
end
end
describe "get_or_fetch/1 remote users with tld, while BE is runned on subdomain" do
describe "get_or_fetch/1 remote users with tld, while BE is running on a subdomain" do
setup do: clear_config([Pleroma.Web.WebFinger, :update_nickname_on_user_fetch], true)
test "for mastodon" do
@ -1018,13 +1018,13 @@ defmodule Pleroma.UserTest do
@tag capture_log: true
test "returns nil if no user could be fetched" do
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant@social.heldscal.la")
assert fetched_user == "not found nonexistant@social.heldscal.la"
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistent@social.heldscal.la")
assert fetched_user == "not found nonexistent@social.heldscal.la"
end
test "returns nil for nonexistant local user" do
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistant")
assert fetched_user == "not found nonexistant"
test "returns nil for nonexistent local user" do
{:error, fetched_user} = User.get_or_fetch_by_nickname("nonexistent")
assert fetched_user == "not found nonexistent"
end
test "updates an existing user, if stale" do
@ -1132,7 +1132,7 @@ defmodule Pleroma.UserTest do
assert cs.valid?
end
test "it sets the follower_adress" do
test "it sets the follower_address" do
cs = User.remote_user_changeset(@valid_remote)
# remote users get a fake local follower address
assert cs.changes.follower_address ==

View file

@ -1028,7 +1028,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
refute repeat_activity in activities
end
test "see your own posts even when they adress actors from blocked domains" do
test "see your own posts even when they address actors from blocked domains" do
user = insert(:user)
domain = "dogwhistle.zone"

View file

@ -24,7 +24,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.EnsureRePrependedTest do
assert res["object"]["summary"] == "re: object-summary"
end
test "it adds `re:` to summary object when child summary containts re-subject of parent summary " do
test "it adds `re:` to summary object when child summary contains re-subject of parent summary " do
message = %{
"type" => "Create",
"object" => %{

View file

@ -164,7 +164,7 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AttachmentValidatorTest do
assert attachment.mediaType == "image/jpeg"
end
test "it transforms image dimentions to our internal format" do
test "it transforms image dimensions to our internal format" do
attachment = %{
"type" => "Document",
"name" => "Hello world",

View file

@ -508,7 +508,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.NoteHandlingTest do
[data: data]
end
test "returns not modified object when hasn't containts inReplyTo field", %{data: data} do
test "returns not modified object when has no inReplyTo field", %{data: data} do
assert Transmogrifier.fix_in_reply_to(data) == data
end

View file

@ -32,7 +32,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.UndoHandlingTest do
assert activity.data["type"] == "Undo"
end
test "it returns an error for incoming unlikes wihout a like activity" do
test "it returns an error for incoming unlikes without a like activity" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{status: "leave a like pls"})

View file

@ -17,7 +17,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
require Pleroma.Constants
describe "strip_report_status_data/1" do
test "does not break on issues with the reported activites" do
test "does not break on issues with the reported activities" do
reporter = insert(:user)
target_account = insert(:user)
{:ok, activity} = CommonAPI.post(target_account, %{status: "foobar"})
@ -153,7 +153,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
assert Enum.sort(cc) == expected_cc
end
test "does not adress actor's follower address if the activity is not public", %{
test "does not address actor's follower address if the activity is not public", %{
user: user,
other_user: other_user,
third_user: third_user
@ -622,7 +622,7 @@ defmodule Pleroma.Web.ActivityPub.UtilsTest do
end
describe "get_cached_emoji_reactions/1" do
test "returns the normalized data or an emtpy list" do
test "returns the normalized data or an empty list" do
object = insert(:note)
assert Utils.get_cached_emoji_reactions(object) == []

View file

@ -163,7 +163,7 @@ defmodule Pleroma.Web.AdminAPI.OAuthAppControllerTest do
assert response == ""
end
test "with non existance id", %{conn: conn} do
test "with nonexistent id", %{conn: conn} do
response =
conn
|> delete("/api/pleroma/admin/oauth_app/0")

View file

@ -1360,7 +1360,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert user.registration_reason == "I'm a cool dude, bro"
end
test "returns error when user already registred", %{conn: conn, valid_params: valid_params} do
test "returns error when user already registered", %{conn: conn, valid_params: valid_params} do
_user = insert(:user, email: "lain@example.org")
app_token = insert(:oauth_token, user: nil)
@ -1495,7 +1495,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|> Plug.Conn.put_req_header("authorization", "Bearer " <> token)
|> put_req_header("content-type", "multipart/form-data")
|> post("/api/v1/accounts", %{
nickname: "nickanme",
nickname: "nickname",
agreement: true,
email: "email@example.com",
fullname: "Lain",
@ -1781,7 +1781,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{language: "ru_RU"} = Pleroma.User.get_by_nickname("foo")
end
test "createing an account without language parameter should fallback to cookie/header language",
test "creating an account without language parameter should fallback to cookie/header language",
%{conn: conn} do
params = %{
username: "foo2",

View file

@ -214,7 +214,7 @@ defmodule Pleroma.Web.OAuth.MFAControllerTest do
assert response == %{"error" => "Invalid code"}
end
test "returns error when client credentails is wrong ", %{conn: conn, user: user} do
test "returns error when client credentials is wrong ", %{conn: conn, user: user} do
otp_token = TOTP.generate_token(user.multi_factor_authentication_settings.totp.secret)
mfa_token = insert(:mfa_token, user: user)

View file

@ -13,7 +13,7 @@ defmodule Pleroma.Web.OAuth.Token.UtilsTest do
Utils.fetch_app(%Plug.Conn{params: %{"client_id" => 1, "client_secret" => "x"}})
end
test "returns App by params credentails" do
test "returns App by params credentials" do
app = insert(:oauth_app)
assert {:ok, load_app} =
@ -24,7 +24,7 @@ defmodule Pleroma.Web.OAuth.Token.UtilsTest do
assert load_app == app
end
test "returns App by header credentails" do
test "returns App by header credentials" do
app = insert(:oauth_app)
header = "Basic " <> Base.encode64("#{app.client_id}:#{app.client_secret}")

View file

@ -16,7 +16,7 @@ defmodule Pleroma.Web.PleromaApi.InstancesControllerTest do
{:ok, %Pleroma.Instances.Instance{unreachable_since: constant_unreachable}} =
Instances.set_consistently_unreachable(constant)
_eventual_unrechable = Instances.set_unreachable(eventual)
_eventual_unreachable = Instances.set_unreachable(eventual)
%{constant_unreachable: constant_unreachable, constant: constant}
end

View file

@ -48,7 +48,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
]
end
test "reach user on tld, while pleroma is runned on subdomain" do
test "reach user on tld, while pleroma is running on subdomain" do
Pleroma.Web.Endpoint.config_change(
[{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}],
[]

View file

@ -178,7 +178,7 @@ defmodule HttpRequestMock do
end
def get(
"https://social.heldscal.la/.well-known/webfinger?resource=nonexistant@social.heldscal.la",
"https://social.heldscal.la/.well-known/webfinger?resource=nonexistent@social.heldscal.la",
_,
_,
[{"accept", "application/xrd+xml,application/jrd+json"}]
@ -186,7 +186,7 @@ defmodule HttpRequestMock do
{:ok,
%Tesla.Env{
status: 200,
body: File.read!("test/fixtures/tesla_mock/nonexistant@social.heldscal.la.xml")
body: File.read!("test/fixtures/tesla_mock/nonexistent@social.heldscal.la.xml")
}}
end