Rename
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
066ec8fe95
commit
2b739faa7e
10 changed files with 34 additions and 31 deletions
|
|
@ -1,10 +1,10 @@
|
|||
defmodule Pleroma.TranslationTest do
|
||||
defmodule Pleroma.Language.TranslationTest do
|
||||
use Pleroma.Web.ConnCase
|
||||
|
||||
alias Pleroma.Translation
|
||||
alias Pleroma.Language.Translation
|
||||
# use Oban.Testing, repo: Pleroma.Repo
|
||||
|
||||
setup do: clear_config([Pleroma.Translation, :service], TranslationMock)
|
||||
setup do: clear_config([Pleroma.Language.Translation, :provider], TranslationMock)
|
||||
|
||||
test "it translates text" do
|
||||
assert {:ok,
|
||||
|
|
@ -2552,7 +2552,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
end
|
||||
|
||||
describe "translating statuses" do
|
||||
setup do: clear_config([Pleroma.Translation, :service], TranslationMock)
|
||||
setup do: clear_config([Pleroma.Language.Translation, :provider], TranslationMock)
|
||||
|
||||
test "it translates a status to user language" do
|
||||
user = insert(:user, language: "fr")
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule TranslationMock do
|
||||
alias Pleroma.Translation.Service
|
||||
alias Pleroma.Language.Translation.Provider
|
||||
|
||||
@behaviour Service
|
||||
@behaviour Provider
|
||||
|
||||
@impl Service
|
||||
@impl Provider
|
||||
def configured?, do: true
|
||||
|
||||
@impl Service
|
||||
@impl Provider
|
||||
def translate(content, source_language, _target_language) do
|
||||
{:ok,
|
||||
%{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue