aboutsummaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_utils_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-02-11 15:39:19 -0600
committerMark Felder <feld@FreeBSD.org>2020-02-11 15:39:19 -0600
commitff9fd4ca895563178e3174fdc86d866508c5a9fa (patch)
tree455c352b27b87654ba92b7cd6c87a544deeda290 /test/web/common_api/common_api_utils_test.exs
parentd056f7f722b5e734ac53d8b55a0228174d64cc9f (diff)
downloadpleroma-ff9fd4ca895563178e3174fdc86d866508c5a9fa.tar.gz
Fix the confusingly named and inverted logic of "no_attachment_links"
The setting is now simply "attachment_links" and the boolean value does what you expect. A double negative is never possible and describing the functionality is no longer a philospher's worst nightmare.
Diffstat (limited to 'test/web/common_api/common_api_utils_test.exs')
-rw-r--r--test/web/common_api/common_api_utils_test.exs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs
index 4b761e039..848300ef3 100644
--- a/test/web/common_api/common_api_utils_test.exs
+++ b/test/web/common_api/common_api_utils_test.exs
@@ -575,11 +575,11 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
end
describe "maybe_add_attachments/3" do
- test "returns parsed results when no_links is true" do
+ test "returns parsed results when attachment_links is false" do
assert Utils.maybe_add_attachments(
{"test", [], ["tags"]},
[],
- true
+ false
) == {"test", [], ["tags"]}
end
@@ -589,7 +589,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
assert Utils.maybe_add_attachments(
{"test", [], ["tags"]},
[attachment],
- false
+ true
) == {
"test<br><a href=\"SakuraPM.png\" class='attachment'>SakuraPM.png</a>",
[],