diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-10-21 14:19:15 +0700 | 
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-10-21 14:19:15 +0700 | 
| commit | 4ea1a61b008c932bc83fcd6cd07bb7f4c251204a (patch) | |
| tree | c763bd3a2a21ee3e40384ee323076bbb577b7ccb /test/web/mastodon_api/views | |
| parent | 8ad015ef64e0d2a4cd9f2979ff08d28be3a635e5 (diff) | |
| parent | 62e3d76a450c1b34ba8d0c88a184ec861ed90f29 (diff) | |
| download | pleroma-4ea1a61b008c932bc83fcd6cd07bb7f4c251204a.tar.gz pleroma-4ea1a61b008c932bc83fcd6cd07bb7f4c251204a.zip  | |
Merge branch 'develop' into refactor/following-relationships
Diffstat (limited to 'test/web/mastodon_api/views')
| -rw-r--r-- | test/web/mastodon_api/views/account_view_test.exs | 4 | ||||
| -rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 11 | 
2 files changed, 6 insertions, 9 deletions
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs index b7a4938a6..ad209b4a3 100644 --- a/test/web/mastodon_api/views/account_view_test.exs +++ b/test/web/mastodon_api/views/account_view_test.exs @@ -424,8 +424,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do        other_user = insert(:user)        {:ok, _activity} = -        CommonAPI.post(user, %{ -          "status" => "Hey @#{other_user.nickname}.", +        CommonAPI.post(other_user, %{ +          "status" => "Hey @#{user.nickname}.",            "visibility" => "direct"          }) diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 1d5a6e956..c200ad8fe 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -14,7 +14,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do    alias Pleroma.Web.CommonAPI.Utils    alias Pleroma.Web.MastodonAPI.AccountView    alias Pleroma.Web.MastodonAPI.StatusView -  alias Pleroma.Web.OStatus    import Pleroma.Factory    import Tesla.Mock @@ -230,17 +229,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do    end    test "contains mentions" do -    incoming = File.read!("test/fixtures/incoming_reply_mastodon.xml") -    # a user with this ap id might be in the cache. -    recipient = "https://pleroma.soykaf.com/users/lain" -    user = insert(:user, %{ap_id: recipient}) +    user = insert(:user) +    mentioned = insert(:user) -    {:ok, [activity]} = OStatus.handle_incoming(incoming) +    {:ok, activity} = CommonAPI.post(user, %{"status" => "hi @#{mentioned.nickname}"})      status = StatusView.render("show.json", %{activity: activity})      assert status.mentions == -             Enum.map([user], fn u -> AccountView.render("mention.json", %{user: u}) end) +             Enum.map([mentioned], fn u -> AccountView.render("mention.json", %{user: u}) end)    end    test "create mentions from the 'to' field" do  | 
