diff options
| author | dtluna <dtluna@openmailbox.org> | 2017-06-20 00:12:37 +0300 | 
|---|---|---|
| committer | dtluna <dtluna@openmailbox.org> | 2017-06-20 00:12:37 +0300 | 
| commit | 069daf644d984c479eae6483595a3307e923950b (patch) | |
| tree | 2832236b8a966d13061cdcc303b8c40c8a387aea /test/web/twitter_api/twitter_api_test.exs | |
| parent | 45c751985ee1612bd788c460ee1f6aca75f24464 (diff) | |
| download | pleroma-069daf644d984c479eae6483595a3307e923950b.tar.gz pleroma-069daf644d984c479eae6483595a3307e923950b.zip | |
Replace UserRepresenter with UserView
Diffstat (limited to 'test/web/twitter_api/twitter_api_test.exs')
| -rw-r--r-- | test/web/twitter_api/twitter_api_test.exs | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs index adea67422..4708fe093 100644 --- a/test/web/twitter_api/twitter_api_test.exs +++ b/test/web/twitter_api/twitter_api_test.exs @@ -1,10 +1,9 @@  defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do    use Pleroma.DataCase    alias Pleroma.Builders.{UserBuilder, ActivityBuilder} -  alias Pleroma.Web.TwitterAPI.TwitterAPI -  alias Pleroma.Web.TwitterAPI.Utils +  alias Pleroma.Web.TwitterAPI.{TwitterAPI,UserView,Utils}    alias Pleroma.{Activity, User, Object, Repo} -  alias Pleroma.Web.TwitterAPI.Representers.{ActivityRepresenter, UserRepresenter} +  alias Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter    alias Pleroma.Web.ActivityPub.ActivityPub    import Pleroma.Factory @@ -303,7 +302,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do      {:ok, user} = TwitterAPI.register_user(data)      fetched_user = Repo.get_by(User, nickname: "lain") -    assert user == UserRepresenter.to_map(fetched_user) +    assert UserView.render("show.json", %{user: user}) == UserView.render("show.json", %{user: fetched_user})    end    test "it returns the error on registration problems" do @@ -358,7 +357,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do        {:ok, represented} = TwitterAPI.get_external_profile(user, id)        remote = User.get_by_ap_id(id) -      assert represented == UserRepresenter.to_map(remote, %{for: user}) +      assert represented == UserView.render("show.json", %{user: remote, for: user})        # Also fetches the feed.        assert Activity.get_create_activity_by_object_ap_id("tag:mastodon.social,2017-04-05:objectId=1641750:objectType=Status") | 
