Fix background updating / handling.
This commit is contained in:
parent
371d96b1da
commit
91065e1968
3 changed files with 10 additions and 3 deletions
|
|
@ -337,7 +337,7 @@ defmodule Pleroma.Web.OStatusTest do
|
|||
%Pleroma.User.Info{
|
||||
id: user.info.id,
|
||||
ap_enabled: false,
|
||||
background: nil,
|
||||
background: %{},
|
||||
banner: %{},
|
||||
blocks: [],
|
||||
deactivated: false,
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||
|> assign(:user, user)
|
||||
|> post(authenticated_twitter_api__path(conn, :update_banner), %{"banner" => new_banner})
|
||||
|> json_response(200)
|
||||
|
||||
user = Repo.get(User, user.id)
|
||||
assert user.info.banner["type"] == "Image"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -39,6 +42,9 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||
|> assign(:user, user)
|
||||
|> post(authenticated_twitter_api__path(conn, :update_background), %{"img" => new_bg})
|
||||
|> json_response(200)
|
||||
|
||||
user = Repo.get(User, user.id)
|
||||
assert user.info.background["type"] == "Image"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue