summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/support/ostatus_mock.ex11
-rw-r--r--test/support/websub_mock.ex9
-rw-r--r--test/web/websub/websub_controller_test.exs7
3 files changed, 1 insertions, 26 deletions
diff --git a/test/support/ostatus_mock.ex b/test/support/ostatus_mock.ex
deleted file mode 100644
index 9c0f2f323..000000000
--- a/test/support/ostatus_mock.ex
+++ /dev/null
@@ -1,11 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.Web.OStatusMock do
- import Pleroma.Factory
-
- def handle_incoming(_doc) do
- insert(:note_activity)
- end
-end
diff --git a/test/support/websub_mock.ex b/test/support/websub_mock.ex
deleted file mode 100644
index e3d5a5b16..000000000
--- a/test/support/websub_mock.ex
+++ /dev/null
@@ -1,9 +0,0 @@
-# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
-# SPDX-License-Identifier: AGPL-3.0-only
-
-defmodule Pleroma.Web.WebsubMock do
- def verify(sub) do
- {:ok, sub}
- end
-end
diff --git a/test/web/websub/websub_controller_test.exs b/test/web/websub/websub_controller_test.exs
index 1e69ed01a..f79745d58 100644
--- a/test/web/websub/websub_controller_test.exs
+++ b/test/web/websub/websub_controller_test.exs
@@ -5,7 +5,6 @@
defmodule Pleroma.Web.Websub.WebsubControllerTest do
use Pleroma.Web.ConnCase
import Pleroma.Factory
- alias Pleroma.Activity
alias Pleroma.Repo
alias Pleroma.Web.Websub
alias Pleroma.Web.Websub.WebsubClientSubscription
@@ -52,7 +51,7 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
end
describe "websub_incoming" do
- test "handles incoming feed updates", %{conn: conn} do
+ test "accepts incoming feed updates", %{conn: conn} do
websub = insert(:websub_client_subscription)
doc = "some stuff"
signature = Websub.sign(websub.secret, doc)
@@ -64,8 +63,6 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
|> post("/push/subscriptions/#{websub.id}", doc)
assert response(conn, 200) == "OK"
-
- assert length(Repo.all(Activity)) == 1
end
test "rejects incoming feed updates with the wrong signature", %{conn: conn} do
@@ -80,8 +77,6 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
|> post("/push/subscriptions/#{websub.id}", doc)
assert response(conn, 500) == "Error"
-
- assert Enum.empty?(Repo.all(Activity))
end
end
end