diff options
Diffstat (limited to 'test/tasks')
| -rw-r--r-- | test/tasks/database_test.exs | 4 | ||||
| -rw-r--r-- | test/tasks/ecto/migrate_test.exs | 2 | ||||
| -rw-r--r-- | test/tasks/instance_test.exs | 11 | ||||
| -rw-r--r-- | test/tasks/relay_test.exs | 2 | ||||
| -rw-r--r-- | test/tasks/user_test.exs | 2 | 
5 files changed, 14 insertions, 7 deletions
| diff --git a/test/tasks/database_test.exs b/test/tasks/database_test.exs index a9925c361..b63dcac00 100644 --- a/test/tasks/database_test.exs +++ b/test/tasks/database_test.exs @@ -77,12 +77,10 @@ defmodule Mix.Tasks.Pleroma.DatabaseTest do        assert length(following) == 2        assert info.follower_count == 0 -      info_cng = Ecto.Changeset.change(info, %{follower_count: 3}) -        {:ok, user} =          user          |> Ecto.Changeset.change(%{following: following ++ following}) -        |> Ecto.Changeset.put_embed(:info, info_cng) +        |> User.change_info(&Ecto.Changeset.change(&1, %{follower_count: 3}))          |> Repo.update()        assert length(user.following) == 4 diff --git a/test/tasks/ecto/migrate_test.exs b/test/tasks/ecto/migrate_test.exs index 0538a7b40..42f6cbf47 100644 --- a/test/tasks/ecto/migrate_test.exs +++ b/test/tasks/ecto/migrate_test.exs @@ -1,5 +1,5 @@  # Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>  # SPDX-License-Identifier: AGPL-3.0-onl  defmodule Mix.Tasks.Pleroma.Ecto.MigrateTest do diff --git a/test/tasks/instance_test.exs b/test/tasks/instance_test.exs index 70986374e..6d7eed4c1 100644 --- a/test/tasks/instance_test.exs +++ b/test/tasks/instance_test.exs @@ -7,7 +7,16 @@ defmodule Pleroma.InstanceTest do    setup do      File.mkdir_p!(tmp_path()) -    on_exit(fn -> File.rm_rf(tmp_path()) end) + +    on_exit(fn -> +      File.rm_rf(tmp_path()) +      static_dir = Pleroma.Config.get([:instance, :static_dir], "test/instance_static/") + +      if File.exists?(static_dir) do +        File.rm_rf(Path.join(static_dir, "robots.txt")) +      end +    end) +      :ok    end diff --git a/test/tasks/relay_test.exs b/test/tasks/relay_test.exs index 7bde56606..c866608ab 100644 --- a/test/tasks/relay_test.exs +++ b/test/tasks/relay_test.exs @@ -1,5 +1,5 @@  # Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>  # SPDX-License-Identifier: AGPL-3.0-only  defmodule Mix.Tasks.Pleroma.RelayTest do diff --git a/test/tasks/user_test.exs b/test/tasks/user_test.exs index 2b9453042..cf12d9ed6 100644 --- a/test/tasks/user_test.exs +++ b/test/tasks/user_test.exs @@ -1,5 +1,5 @@  # Pleroma: A lightweight social networking server -# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/> +# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>  # SPDX-License-Identifier: AGPL-3.0-only  defmodule Mix.Tasks.Pleroma.UserTest do | 
