embedded_schema do
field(:banner, :map, default: %{})
- field(:background, :string, default: nil)
+ field(:background, :map, default: %{})
field(:source_data, :map, default: %{})
field(:note_count, :integer, default: 0)
field(:follower_count, :integer, default: 0)
:locked,
:no_rich_text,
:default_scope,
- :banner
+ :banner,
+ :background
])
end
|> 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
|> 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