diff options
author | lain <lain@soykaf.club> | 2019-04-10 09:32:17 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-04-10 09:32:17 +0200 |
commit | b5cecebbc14c80d08f1a9f541722218c48dc514f (patch) | |
tree | 11f2470b8150e4fc98d86442aedf82d2983cb339 | |
parent | a9f805c87100fd2ee1d8426460b81af4a235d574 (diff) | |
download | pleroma-b5cecebbc14c80d08f1a9f541722218c48dc514f.tar.gz pleroma-b5cecebbc14c80d08f1a9f541722218c48dc514f.zip |
Conversations: Fix specs.
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index 9e19fb48e..519ad8f4d 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -320,7 +320,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do res_conn = conn - |> assign(:user, user) + |> assign(:user, user_one) |> get("/api/v1/conversations") assert response = json_response(res_conn, 200) @@ -330,22 +330,22 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do "accounts" => res_accounts, "last_status" => res_last_status, "unread" => unread - } = reponse + } = response assert unread == false # Apparently undocumented API endpoint res_conn = conn - |> assign(:user, user) - |> get("/api/v1/conversations/#{res_id}/read") + |> assign(:user, user_one) + |> post("/api/v1/conversations/#{res_id}/read") assert response == json_response(res_conn, 200) # (vanilla) Mastodon frontend behaviour res_conn = conn - |> assign(:user, user) + |> assign(:user, user_one) |> get("/api/v1/statuses/#{res_last_status.id}/context") assert %{ancestors: [], descendants: []} == json_response(res_conn, 200) |