Conversations: Fix specs.
This commit is contained in:
parent
a9f805c871
commit
b5cecebbc1
|
@ -320,7 +320,7 @@ test "Conversations", %{conn: conn} do
|
||||||
|
|
||||||
res_conn =
|
res_conn =
|
||||||
conn
|
conn
|
||||||
|> assign(:user, user)
|
|> assign(:user, user_one)
|
||||||
|> get("/api/v1/conversations")
|
|> get("/api/v1/conversations")
|
||||||
|
|
||||||
assert response = json_response(res_conn, 200)
|
assert response = json_response(res_conn, 200)
|
||||||
|
@ -330,22 +330,22 @@ test "Conversations", %{conn: conn} do
|
||||||
"accounts" => res_accounts,
|
"accounts" => res_accounts,
|
||||||
"last_status" => res_last_status,
|
"last_status" => res_last_status,
|
||||||
"unread" => unread
|
"unread" => unread
|
||||||
} = reponse
|
} = response
|
||||||
|
|
||||||
assert unread == false
|
assert unread == false
|
||||||
|
|
||||||
# Apparently undocumented API endpoint
|
# Apparently undocumented API endpoint
|
||||||
res_conn =
|
res_conn =
|
||||||
conn
|
conn
|
||||||
|> assign(:user, user)
|
|> assign(:user, user_one)
|
||||||
|> get("/api/v1/conversations/#{res_id}/read")
|
|> post("/api/v1/conversations/#{res_id}/read")
|
||||||
|
|
||||||
assert response == json_response(res_conn, 200)
|
assert response == json_response(res_conn, 200)
|
||||||
|
|
||||||
# (vanilla) Mastodon frontend behaviour
|
# (vanilla) Mastodon frontend behaviour
|
||||||
res_conn =
|
res_conn =
|
||||||
conn
|
conn
|
||||||
|> assign(:user, user)
|
|> assign(:user, user_one)
|
||||||
|> get("/api/v1/statuses/#{res_last_status.id}/context")
|
|> get("/api/v1/statuses/#{res_last_status.id}/context")
|
||||||
|
|
||||||
assert %{ancestors: [], descendants: []} == json_response(res_conn, 200)
|
assert %{ancestors: [], descendants: []} == json_response(res_conn, 200)
|
||||||
|
|
Loading…
Reference in a new issue