diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-07-13 13:32:21 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-07-13 13:32:21 -0500 |
commit | 80c21100db306ce45856bbdb97d3439676babeeb (patch) | |
tree | d143f523da262df5176220fbe6dc0b6370c91ebc /test/web/mastodon_api/controllers/status_controller_test.exs | |
parent | ce85db41a30d95555bbd44d8931c4a3a357938d8 (diff) | |
parent | 5d215fd81f529b639db9096ca71d4e7f0a6ed386 (diff) | |
download | pleroma-80c21100db306ce45856bbdb97d3439676babeeb.tar.gz pleroma-80c21100db306ce45856bbdb97d3439676babeeb.zip |
Merge branch 'develop' into refactor/notification_settings
Diffstat (limited to 'test/web/mastodon_api/controllers/status_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/status_controller_test.exs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/web/mastodon_api/controllers/status_controller_test.exs b/test/web/mastodon_api/controllers/status_controller_test.exs index a98e939e8..fd2de8d80 100644 --- a/test/web/mastodon_api/controllers/status_controller_test.exs +++ b/test/web/mastodon_api/controllers/status_controller_test.exs @@ -760,13 +760,18 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do test "when you created it" do %{user: author, conn: conn} = oauth_access(["write:statuses"]) activity = insert(:note_activity, user: author) + object = Object.normalize(activity) - conn = + content = object.data["content"] + source = object.data["source"] + + result = conn |> assign(:user, author) |> delete("/api/v1/statuses/#{activity.id}") + |> json_response_and_validate_schema(200) - assert %{} = json_response_and_validate_schema(conn, 200) + assert match?(%{"content" => ^content, "text" => ^source}, result) refute Activity.get_by_id(activity.id) end @@ -789,7 +794,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do conn = delete(conn, "/api/v1/statuses/#{activity.id}") - assert %{"error" => _} = json_response_and_validate_schema(conn, 403) + assert %{"error" => "Record not found"} == json_response_and_validate_schema(conn, 404) assert Activity.get_by_id(activity.id) == activity end |