diff options
| author | lain <lain@soykaf.club> | 2018-06-03 19:28:11 +0200 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2018-06-03 19:28:11 +0200 | 
| commit | 4856ba596f5682a48a5cd17cacb607d996764f7a (patch) | |
| tree | 98fbe49e8598c378063279a3f1c7323992a223b9 /test/web/mastodon_api | |
| parent | 0f70e83e8c745645703be8084001b1ef92c03823 (diff) | |
| download | pleroma-4856ba596f5682a48a5cd17cacb607d996764f7a.tar.gz pleroma-4856ba596f5682a48a5cd17cacb607d996764f7a.zip | |
Better error handling for MastodonApiController.
Diffstat (limited to 'test/web/mastodon_api')
| -rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 12 | 
1 files changed, 12 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 2abcf0dfe..1291c3693 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -505,6 +505,18 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do        assert to_string(activity.id) == id      end + +    test "returns 500 for a wrong id", %{conn: conn} do +      user = insert(:user) + +      resp = +        conn +        |> assign(:user, user) +        |> post("/api/v1/statuses/1/favourite") +        |> json_response(500) + +      assert resp == "Something went wrong" +    end    end    describe "unfavoriting" do | 
