diff options
author | William Pitcock <nenolod@dereferenced.org> | 2019-01-28 06:19:00 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2019-01-28 06:19:00 +0000 |
commit | 339c26e12ba7312d283191196888ca7a5ce81dfe (patch) | |
tree | 74ce7a9386071f6e762c7931a7398eb4a9fc8f24 | |
parent | ebeabdcc72dffb0a7f66133a511a19025888cfdc (diff) | |
download | pleroma-339c26e12ba7312d283191196888ca7a5ce81dfe.tar.gz |
test: add status posting with OGP link preview test
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 02a0eb228..1a5eb090c 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -136,6 +136,20 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert Repo.get(Activity, id) end + test "posting a status with OGP link preview", %{conn: conn} do + user = insert(:user) + + conn = + conn + |> assign(:user, user) + |> post("/api/v1/statuses", %{ + "status" => "http://example.com/ogp" + }) + + assert %{"id" => id, "card" => %{"title" => "The Rock"}} = json_response(conn, 200) + assert Repo.get(Activity, id) + end + test "posting a direct status", %{conn: conn} do user1 = insert(:user) user2 = insert(:user) |