changelog
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
f954f98fb7
commit
b53abd9d79
5 changed files with 26 additions and 21 deletions
|
|
@ -2556,7 +2556,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
|
||||
test "it translates a status to user language" do
|
||||
user = insert(:user, language: "fr")
|
||||
%{conn: conn, user: user} = oauth_access(["read:statuses"], user: user)
|
||||
%{conn: conn} = oauth_access(["read:statuses"], user: user)
|
||||
another_user = insert(:user)
|
||||
|
||||
{:ok, activity} =
|
||||
|
|
@ -2579,7 +2579,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
end
|
||||
|
||||
test "it returns an error if no target language provided" do
|
||||
%{conn: conn, user: user} = oauth_access(["read:statuses"])
|
||||
%{conn: conn} = oauth_access(["read:statuses"])
|
||||
another_user = insert(:user)
|
||||
|
||||
{:ok, activity} =
|
||||
|
|
@ -2588,10 +2588,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
language: "pl"
|
||||
})
|
||||
|
||||
response =
|
||||
conn
|
||||
|> post("/api/v1/statuses/#{activity.id}/translate")
|
||||
|> json_response_and_validate_schema(400)
|
||||
assert conn
|
||||
|> post("/api/v1/statuses/#{activity.id}/translate")
|
||||
|> json_response_and_validate_schema(400)
|
||||
end
|
||||
|
||||
test "it doesn't translate non-public statuses" do
|
||||
|
|
@ -2604,10 +2603,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
language: "pl"
|
||||
})
|
||||
|
||||
response =
|
||||
conn
|
||||
|> post("/api/v1/statuses/#{activity.id}/translate")
|
||||
|> json_response_and_validate_schema(404)
|
||||
assert conn
|
||||
|> post("/api/v1/statuses/#{activity.id}/translate")
|
||||
|> json_response_and_validate_schema(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue