forked from AkkomaGang/akkoma
Merge 2023.04 stable release #7
1 changed files with 4 additions and 0 deletions
|
@ -296,6 +296,7 @@ test "shows extra information in the mrf_simple_info field for relevant entries"
|
||||||
describe "public timeline visibility" do
|
describe "public timeline visibility" do
|
||||||
test "shows public timeline visibility", %{conn: conn} do
|
test "shows public timeline visibility", %{conn: conn} do
|
||||||
clear_config([:restrict_unauthenticated, :timelines], %{local: false, federated: false})
|
clear_config([:restrict_unauthenticated, :timelines], %{local: false, federated: false})
|
||||||
|
|
||||||
response =
|
response =
|
||||||
conn
|
conn
|
||||||
|> get("/nodeinfo/2.1.json")
|
|> get("/nodeinfo/2.1.json")
|
||||||
|
@ -305,14 +306,17 @@ test "shows public timeline visibility", %{conn: conn} do
|
||||||
assert response["metadata"]["publicTimelineVisibility"]["federated"] == true
|
assert response["metadata"]["publicTimelineVisibility"]["federated"] == true
|
||||||
|
|
||||||
clear_config([:restrict_unauthenticated, :timelines], %{local: true, federated: false})
|
clear_config([:restrict_unauthenticated, :timelines], %{local: true, federated: false})
|
||||||
|
|
||||||
response =
|
response =
|
||||||
conn
|
conn
|
||||||
|> get("/nodeinfo/2.1.json")
|
|> get("/nodeinfo/2.1.json")
|
||||||
|> json_response(:ok)
|
|> json_response(:ok)
|
||||||
|
|
||||||
assert response["metadata"]["publicTimelineVisibility"]["local"] == false
|
assert response["metadata"]["publicTimelineVisibility"]["local"] == false
|
||||||
assert response["metadata"]["publicTimelineVisibility"]["federated"] == true
|
assert response["metadata"]["publicTimelineVisibility"]["federated"] == true
|
||||||
|
|
||||||
clear_config([:restrict_unauthenticated, :timelines], %{local: false, federated: true})
|
clear_config([:restrict_unauthenticated, :timelines], %{local: false, federated: true})
|
||||||
|
|
||||||
response =
|
response =
|
||||||
conn
|
conn
|
||||||
|> get("/nodeinfo/2.1.json")
|
|> get("/nodeinfo/2.1.json")
|
||||||
|
|
Loading…
Reference in a new issue