end
test "posting a status with OGP link preview", %{conn: conn} do
+ Pleroma.Config.put([:rich_media, :enabled], true)
user = insert(:user)
conn =
assert %{"id" => id, "card" => %{"title" => "The Rock"}} = json_response(conn, 200)
assert Repo.get(Activity, id)
+ Pleroma.Config.put([:rich_media, :enabled], false)
end
test "posting a direct status", %{conn: conn} do
assert id == to_string(user.id)
end
- test "getting followers, hide_network", %{conn: conn} do
+ test "getting followers, hide_followers", %{conn: conn} do
user = insert(:user)
- other_user = insert(:user, %{info: %{hide_network: true}})
+ other_user = insert(:user, %{info: %{hide_followers: true}})
{:ok, _user} = User.follow(user, other_user)
conn =
assert [] == json_response(conn, 200)
end
- test "getting followers, hide_network, same user requesting", %{conn: conn} do
+ test "getting followers, hide_followers, same user requesting", %{conn: conn} do
user = insert(:user)
- other_user = insert(:user, %{info: %{hide_network: true}})
+ other_user = insert(:user, %{info: %{hide_followers: true}})
{:ok, _user} = User.follow(user, other_user)
conn =
assert id == to_string(other_user.id)
end
- test "getting following, hide_network", %{conn: conn} do
- user = insert(:user, %{info: %{hide_network: true}})
+ test "getting following, hide_follows", %{conn: conn} do
+ user = insert(:user, %{info: %{hide_follows: true}})
other_user = insert(:user)
{:ok, user} = User.follow(user, other_user)
assert [] == json_response(conn, 200)
end
- test "getting following, hide_network, same user requesting", %{conn: conn} do
- user = insert(:user, %{info: %{hide_network: true}})
+ test "getting following, hide_follows, same user requesting", %{conn: conn} do
+ user = insert(:user, %{info: %{hide_follows: true}})
other_user = insert(:user)
{:ok, user} = User.follow(user, other_user)
end
test "Status rich-media Card", %{conn: conn, user: user} do
+ Pleroma.Config.put([:rich_media, :enabled], true)
{:ok, activity} = CommonAPI.post(user, %{"status" => "http://example.com/ogp"})
response =
}
}
}
+
+ Pleroma.Config.put([:rich_media, :enabled], false)
end
end