diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-08-03 17:08:35 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2021-06-01 11:49:14 -0500 |
commit | ff00b354fa5067c898e860e275748dd757cb04cd (patch) | |
tree | ce76a36f0020178521a9c357684fb7b36c8d548a /test | |
parent | ee52fc840d4d6eb1caab811a9b00ab1b95662d77 (diff) | |
download | pleroma-ff00b354fa5067c898e860e275748dd757cb04cd.tar.gz |
Rename the non-federating Chat feature to Shout
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/config/transfer_task_test.exs | 8 | ||||
-rw-r--r-- | test/pleroma/web/admin_api/controllers/config_controller_test.exs | 12 | ||||
-rw-r--r-- | test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs | 2 | ||||
-rw-r--r-- | test/pleroma/web/shout_channel_test.ex (renamed from test/pleroma/web/chat_channel_test.exs) | 10 |
4 files changed, 16 insertions, 16 deletions
diff --git a/test/pleroma/config/transfer_task_test.exs b/test/pleroma/config/transfer_task_test.exs index 8ae5d3b81..7d51fd84c 100644 --- a/test/pleroma/config/transfer_task_test.exs +++ b/test/pleroma/config/transfer_task_test.exs @@ -93,8 +93,8 @@ defmodule Pleroma.Config.TransferTaskTest do end test "on reboot time key" do - clear_config(:chat) - insert(:config, key: :chat, value: [enabled: false]) + clear_config(:shout) + insert(:config, key: :shout, value: [enabled: false]) assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted" end @@ -105,10 +105,10 @@ defmodule Pleroma.Config.TransferTaskTest do end test "don't restart pleroma on reboot time key and subkey if there is false flag" do - clear_config(:chat) + clear_config(:shout) clear_config(Pleroma.Captcha) - insert(:config, key: :chat, value: [enabled: false]) + insert(:config, key: :shout, value: [enabled: false]) insert(:config, key: Pleroma.Captcha, value: [seconds_valid: 60]) refute String.contains?( diff --git a/test/pleroma/web/admin_api/controllers/config_controller_test.exs b/test/pleroma/web/admin_api/controllers/config_controller_test.exs index c39c1b1e1..d8ca07cd3 100644 --- a/test/pleroma/web/admin_api/controllers/config_controller_test.exs +++ b/test/pleroma/web/admin_api/controllers/config_controller_test.exs @@ -409,7 +409,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do end test "saving config which need pleroma reboot", %{conn: conn} do - clear_config([:chat, :enabled], true) + clear_config([:shout, :enabled], true) assert conn |> put_req_header("content-type", "application/json") @@ -417,7 +417,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do "/api/pleroma/admin/config", %{ configs: [ - %{group: ":pleroma", key: ":chat", value: [%{"tuple" => [":enabled", true]}]} + %{group: ":pleroma", key: ":shout", value: [%{"tuple" => [":enabled", true]}]} ] } ) @@ -426,7 +426,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do %{ "db" => [":enabled"], "group" => ":pleroma", - "key" => ":chat", + "key" => ":shout", "value" => [%{"tuple" => [":enabled", true]}] } ], @@ -454,7 +454,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do end test "update setting which need reboot, don't change reboot flag until reboot", %{conn: conn} do - clear_config([:chat, :enabled], true) + clear_config([:shout, :enabled], true) assert conn |> put_req_header("content-type", "application/json") @@ -462,7 +462,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do "/api/pleroma/admin/config", %{ configs: [ - %{group: ":pleroma", key: ":chat", value: [%{"tuple" => [":enabled", true]}]} + %{group: ":pleroma", key: ":shout", value: [%{"tuple" => [":enabled", true]}]} ] } ) @@ -471,7 +471,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do %{ "db" => [":enabled"], "group" => ":pleroma", - "key" => ":chat", + "key" => ":shout", "value" => [%{"tuple" => [":enabled", true]}] } ], diff --git a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs index f137743be..e76cbc75b 100644 --- a/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs +++ b/test/pleroma/web/mastodon_api/controllers/instance_controller_test.exs @@ -38,7 +38,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceControllerTest do "background_upload_limit" => _, "banner_upload_limit" => _, "background_image" => from_config_background, - "chat_limit" => _, + "shout_limit" => _, "description_limit" => _ } = result diff --git a/test/pleroma/web/chat_channel_test.exs b/test/pleroma/web/shout_channel_test.ex index 29999701c..ba6730ceb 100644 --- a/test/pleroma/web/chat_channel_test.exs +++ b/test/pleroma/web/shout_channel_test.ex @@ -2,9 +2,9 @@ # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/> # SPDX-License-Identifier: AGPL-3.0-only -defmodule Pleroma.Web.ChatChannelTest do +defmodule Pleroma.Web.ShoutChannelTest do use Pleroma.Web.ChannelCase - alias Pleroma.Web.ChatChannel + alias Pleroma.Web.ShoutChannel alias Pleroma.Web.UserSocket import Pleroma.Factory @@ -14,7 +14,7 @@ defmodule Pleroma.Web.ChatChannelTest do {:ok, _, socket} = socket(UserSocket, "", %{user_name: user.nickname}) - |> subscribe_and_join(ChatChannel, "chat:public") + |> subscribe_and_join(ShoutChannel, "shout:public") {:ok, socket: socket} end @@ -25,7 +25,7 @@ defmodule Pleroma.Web.ChatChannelTest do end describe "message lengths" do - setup do: clear_config([:instance, :chat_limit]) + setup do: clear_config([:instance, :shout_limit]) test "it ignores messages of length zero", %{socket: socket} do push(socket, "new_msg", %{"text" => ""}) @@ -33,7 +33,7 @@ defmodule Pleroma.Web.ChatChannelTest do end test "it ignores messages above a certain length", %{socket: socket} do - clear_config([:instance, :chat_limit], 2) + Pleroma.Config.put([:instance, :shout_limit], 2) push(socket, "new_msg", %{"text" => "123"}) refute_broadcast("new_msg", %{text: "123"}) end |