describe "home" do
setup do: oauth_access(["read:statuses"])
- test "does NOT render account/pleroma/relationship if this is disabled by default", %{
+ test "does NOT render account/pleroma/relationship by default", %{
user: user,
conn: conn
} do
- clear_config([:extensions, :output_relationships_in_statuses_by_default], false)
-
other_user = insert(:user)
{:ok, _} = CommonAPI.post(other_user, %{"status" => "hi @#{user.nickname}"})
end)
end
- test "the home timeline", %{user: user, conn: conn} do
+ test "embeds account relationships with `with_relationships=true`", %{user: user, conn: conn} do
uri = "/api/v1/timelines/home?with_relationships=true"
following = insert(:user, nickname: "followed")
}
}
},
- "account" => %{"pleroma" => %{"relationship" => %{"following" => true}}}
+ "account" => %{
+ "pleroma" => %{
+ "relationship" => %{"following" => true}
+ }
+ }
},
%{
"content" => "post",
"account" => %{
"acct" => "followed",
- "pleroma" => %{"relationship" => %{"following" => true}}
+ "pleroma" => %{
+ "relationship" => %{"following" => true}
+ }
}
}
] = json_response(ret_conn, :ok)
}
}
},
- "account" => %{"pleroma" => %{"relationship" => %{"following" => true}}}
+ "account" => %{
+ "pleroma" => %{
+ "relationship" => %{"following" => true}
+ }
+ }
},
%{
"content" => "post",
"account" => %{
"acct" => "followed",
- "pleroma" => %{"relationship" => %{"following" => true}}
+ "pleroma" => %{
+ "relationship" => %{"following" => true}
+ }
}
}
] = json_response(ret_conn, :ok)