diff options
Diffstat (limited to 'test/web')
| -rw-r--r-- | test/web/mastodon_api/account_view_test.exs | 8 | ||||
| -rw-r--r-- | test/web/ostatus/ostatus_test.exs | 6 | ||||
| -rw-r--r-- | test/web/twitter_api/views/user_view_test.exs | 28 | 
3 files changed, 24 insertions, 18 deletions
diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs index 061fc2693..5eefa61e1 100644 --- a/test/web/mastodon_api/account_view_test.exs +++ b/test/web/mastodon_api/account_view_test.exs @@ -19,10 +19,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do        statuses_count: 5,        note: user.bio,        url: user.ap_id, -      avatar: "http://localhost:4001/static/avi.png", -      avatar_static: "http://localhost:4001/static/avi.png", -      header: "http://localhost:4001/static/banner.png", -      header_static: "http://localhost:4001/static/banner.png", +      avatar: "http://localhost:4001/images/avi.png", +      avatar_static: "http://localhost:4001/images/avi.png", +      header: "http://localhost:4001/images/banner.png", +      header_static: "http://localhost:4001/images/banner.png",        source: %{          note: "",          privacy: "public", diff --git a/test/web/ostatus/ostatus_test.exs b/test/web/ostatus/ostatus_test.exs index de01612b3..b27f8cb55 100644 --- a/test/web/ostatus/ostatus_test.exs +++ b/test/web/ostatus/ostatus_test.exs @@ -302,7 +302,8 @@ defmodule Pleroma.Web.OStatusTest do          "host" => "social.heldscal.la",          "fqn" => user,          "bio" => "cofe", -        "avatar" => %{"type" => "Image", "url" => [%{"href" => "https://social.heldscal.la/avatar/29191-original-20170421154949.jpeg", "mediaType" => "image/jpeg", "type" => "Link"}]} +        "avatar" => %{"type" => "Image", "url" => [%{"href" => "https://social.heldscal.la/avatar/29191-original-20170421154949.jpeg", "mediaType" => "image/jpeg", "type" => "Link"}]}, +        "subscribe_address" => "https://social.heldscal.la/main/ostatussub?profile={uri}"        }        assert data == expected      end @@ -325,7 +326,8 @@ defmodule Pleroma.Web.OStatusTest do          "host" => "social.heldscal.la",          "fqn" => user,          "bio" => "cofe", -        "avatar" => %{"type" => "Image", "url" => [%{"href" => "https://social.heldscal.la/avatar/29191-original-20170421154949.jpeg", "mediaType" => "image/jpeg", "type" => "Link"}]} +        "avatar" => %{"type" => "Image", "url" => [%{"href" => "https://social.heldscal.la/avatar/29191-original-20170421154949.jpeg", "mediaType" => "image/jpeg", "type" => "Link"}]}, +        "subscribe_address" => "https://social.heldscal.la/main/ostatussub?profile={uri}"        }        assert data == expected      end diff --git a/test/web/twitter_api/views/user_view_test.exs b/test/web/twitter_api/views/user_view_test.exs index 3f84e4116..d5d2f0adc 100644 --- a/test/web/twitter_api/views/user_view_test.exs +++ b/test/web/twitter_api/views/user_view_test.exs @@ -33,8 +33,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do      {:ok, user} = User.update_follower_count(user)      Cachex.set(:user_cache, "user_info:#{user.id}", User.user_info(Repo.get!(User, user.id))) -    image = "http://localhost:4001/static/avi.png" -    banner = "http://localhost:4001/static/banner.png" +    image = "http://localhost:4001/images/avi.png" +    banner = "http://localhost:4001/images/banner.png"      represented = %{        "id" => user.id, @@ -56,7 +56,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do        "rights" => %{},        "statusnet_profile_url" => user.ap_id,        "cover_photo" => banner, -      "background_image" => nil +      "background_image" => nil, +      "is_local" => true      }      assert represented == UserView.render("show.json", %{user: user}) @@ -65,8 +66,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do    test "A user for a given other follower", %{user: user} do      {:ok, follower} = UserBuilder.insert(%{following: [User.ap_followers(user)]})      {:ok, user} = User.update_follower_count(user) -    image = "http://localhost:4001/static/avi.png" -    banner = "http://localhost:4001/static/banner.png" +    image = "http://localhost:4001/images/avi.png" +    banner = "http://localhost:4001/images/banner.png"      represented = %{        "id" => user.id, @@ -88,7 +89,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do        "rights" => %{},        "statusnet_profile_url" => user.ap_id,        "cover_photo" => banner, -      "background_image" => nil +      "background_image" => nil, +      "is_local" => true      }      assert represented == UserView.render("show.json", %{user: user, for: follower}) @@ -98,8 +100,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do      follower = insert(:user)      {:ok, follower} = User.follow(follower, user)      {:ok, user} = User.update_follower_count(user) -    image = "http://localhost:4001/static/avi.png" -    banner = "http://localhost:4001/static/banner.png" +    image = "http://localhost:4001/images/avi.png" +    banner = "http://localhost:4001/images/banner.png"      represented = %{        "id" => follower.id, @@ -121,7 +123,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do        "rights" => %{},        "statusnet_profile_url" => follower.ap_id,        "cover_photo" => banner, -      "background_image" => nil +      "background_image" => nil, +      "is_local" => true      }      assert represented == UserView.render("show.json", %{user: follower, for: user}) @@ -131,8 +134,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do      user = insert(:user)      blocker = insert(:user)      User.block(blocker, user) -    image = "http://localhost:4001/static/avi.png" -    banner = "http://localhost:4001/static/banner.png" +    image = "http://localhost:4001/images/avi.png" +    banner = "http://localhost:4001/images/banner.png"      represented = %{        "id" => user.id, @@ -154,7 +157,8 @@ defmodule Pleroma.Web.TwitterAPI.UserViewTest do        "rights" => %{},        "statusnet_profile_url" => user.ap_id,        "cover_photo" => banner, -      "background_image" => nil +      "background_image" => nil, +      "is_local" => true      }      blocker = Repo.get(User, blocker.id)  | 
