projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test to validate profile pagination works with keyset
[akkoma]
/
test
/
pleroma
/
web
/
o_status
/
o_status_controller_test.exs
diff --git
a/test/pleroma/web/o_status/o_status_controller_test.exs
b/test/pleroma/web/o_status/o_status_controller_test.exs
index ee498f4b555ea10022ac07dbe91f2f6713f88900..65b2c22dbe45bb16ac9a5335f5a3f5ae8675603d 100644
(file)
--- a/
test/pleroma/web/o_status/o_status_controller_test.exs
+++ b/
test/pleroma/web/o_status/o_status_controller_test.exs
@@
-7,7
+7,6
@@
defmodule Pleroma.Web.OStatus.OStatusControllerTest do
import Pleroma.Factory
import Pleroma.Factory
- alias Pleroma.Config
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Object
alias Pleroma.User
alias Pleroma.Web.ActivityPub.ActivityPub
@@
-21,7
+20,7
@@
defmodule Pleroma.Web.OStatus.OStatusControllerTest do
:ok
end
:ok
end
- setup do: clear_config([:
instance, :federating], tru
e)
+ setup do: clear_config([:
static_fe, :enabled], fals
e)
describe "Mastodon compatibility routes" do
setup %{conn: conn} do
describe "Mastodon compatibility routes" do
setup %{conn: conn} do
@@
-215,15
+214,16
@@
defmodule Pleroma.Web.OStatus.OStatusControllerTest do
assert response(conn, 404)
end
assert response(conn, 404)
end
- test "
it requires authentication if instance is NOT federating
", %{
+ test "
does not require authentication on non-federating instances
", %{
conn: conn
} do
conn: conn
} do
-
user = insert(:user
)
+
clear_config([:instance, :federating], false
)
note_activity = insert(:note_activity)
note_activity = insert(:note_activity)
- conn = put_req_header(conn, "accept", "text/html")
-
- ensure_federating_or_authenticated(conn, "/notice/#{note_activity.id}", user)
+ conn
+ |> put_req_header("accept", "text/html")
+ |> get("/notice/#{note_activity.id}")
+ |> response(200)
end
end
end
end
@@
-325,14
+325,16
@@
defmodule Pleroma.Web.OStatus.OStatusControllerTest do
|> response(404)
end
|> response(404)
end
- test "
it requires authentication if instance is NOT federating
", %{
+ test "
does not require authentication on non-federating instances
", %{
conn: conn,
note_activity: note_activity
} do
conn: conn,
note_activity: note_activity
} do
- user = insert(:user)
- conn = put_req_header(conn, "accept", "text/html")
+ clear_config([:instance, :federating], false)
- ensure_federating_or_authenticated(conn, "/notice/#{note_activity.id}/embed_player", user)
+ conn
+ |> put_req_header("accept", "text/html")
+ |> get("/notice/#{note_activity.id}/embed_player")
+ |> response(200)
end
end
end
end
end
end